How To Disable Autosave In WordPress

disable autosave
disable autosave

WordPress saves everything you write on the editor after an interval of 60 seconds. All of the changes that you bring to your page/post is saved as revisions in your database. eThis may use your excessive server resources while you are working on your WordPress site. 

To prevent this, I am sharing two ways to disable Autosave in WordPress. After applying the procedure, WordPress will not save your post revisions. 

Let’s begin then. 

Disable Autosave in WordPress

You can disable autosave in two ways, 1. By editing functions.php file, 2. By Editing wp-config.php file. At here, I am showing both ways. 

Disable Autosave by Adding Code in functions.php File

This is the recommended and easiest way to disable autosave. At first, navigate to Appearance -> Theme Editor, now from the right sidebar, select Theme Functions(functions.php).

Copy the below code snippet and paste it the Theme Functions(functions.php).

add_action( 'admin_init', 'disable_autosave' );
function disable_autosave() {
wp_deregister_script( 'autosave' );

Don’t forget to update the file. Now you are all done, you have successfully disabled the autosave. 

Disable Autosave by Editing wp-config.php File

This is the most used procedure to disable the autosave feature in your WordPress site. All you have to do is copy and paste the following code snippet to your wp-config.php file. 

define('AUTOSAVE_INTERVAL', 86400);

This code will modify and increase the autosave time interval to an entire day. Therefore a post will be saved after a whole day is gone. 

To do this, first, log in to your cPanel. Then access the cPanel File manager code editor and go to the wp-config.php file. 

Paste the above code at the very top and click on Save Changes. 


If you don’t want to use the FTP of your site, use the first method I mentioned here. Besides, the first method is slightly easy, as there is no use of FTP. I hope you have learned to disable autosave in WordPress now. 

If you face any problems, tell me through the comment box. Share this post if you find it useful. 

Leave a Comment

Your email address will not be published. Required fields are marked *

Copy link
Powered by Social Snap