Disable WordPress autosave

In this article I’m going to teach you how you can basically disable the WordPress autosave feature that is used while you’re editing pages or posts. This can help prevent your account from using up excessive server resources while you’re working on your WordPress site.

By default WordPress will autosave any pages or posts that you’re working on once a minute, so if you happened to start working on a new post and then you walked away from your computer those autosaves would continue to happen.

UPDATE 2/18/2014: Starting with WordPress 3.6 the below options still disable the WordPress autosave functionality. However with the new WordPress HeartBeat API, simply using the steps below won’t completely limit the amount of admin-ajax.php requests the dashboard sends to the server.

Please review our guide on WordPress Heartbeat and heavy admin-ajax.php usage for more information.

Disable WordPress autosave with AUTOSAVE_INTERVAL

Using the steps below I’ll show you how you can modify your WordPress wp-config.php file to functionally disable the WordPress autosave feature by setting the AUTOSAVE_INTERVAL value to an entire day.

Doing it this way your page or post will get automatically saved once, then after that you would just need to manually click on Save Draft instead of relying on WordPress to do it once a minute for you.

  1. Login to your cPanel.
  2. Access the cPanel File Manager Code Editor and navigate to your wp-config.php file.
  3. Enter in the highlighted code towards the top of the wp-config.php file:

    * @package WordPress

    define(‘AUTOSAVE_INTERVAL’, 86400);

    // ** MySQL settings – You can get this info from your web host ** //

    After that click on Save Changes at the top-right.

    This sets how often the WordPress autosave should run, and in this case we’ve set it to 86400 seconds which is an entire day. So this effectively disables the autosave functionaility.

    With the WordPress autosave disabled you’ll want to be sure that you are periodically clicking on Save Draft while working on a page or post to ensure that you don’t lose any content, as now WordPress will not be autosaving it for you.

Default autosave settings in use

Here is an example from my WordPress access log prior to making this change while I was editing a post, you can see the requests are happening every minute: – – [29/Jan/2013:14:21:53 -0500] “POST /wp-admin/admin-ajax.php HTTP/1.1” 200 187 “https://example.com/wp-admin/post-new.php” “Mozilla/5.0 Chrome/24” – – [29/Jan/2013:14:21:53 -0500] “POST /wp-admin/admin-ajax.php HTTP/1.1” 200 180 “https://example.com/wp-admin/post-new.php” “Mozilla/5.0 Chrome/24” – – [29/Jan/2013:14:22:40 -0500] “POST /wp-admin/admin-ajax.php HTTP/1.1” 200 220 “https://example.com/wp-admin/post-new.php” “Mozilla/5.0 Chrome/24” – – [29/Jan/2013:14:23:40 -0500] “POST /wp-admin/admin-ajax.php HTTP/1.1” 200 220 “https://example.com/wp-admin/post-new.php” “Mozilla/5.0 Chrome/24” – – [29/Jan/2013:14:24:40 -0500] “POST /wp-admin/admin-ajax.php HTTP/1.1” 200 199 “https://example.com/wp-admin/post-new.php” “Mozilla/5.0 Chrome/24” – – [29/Jan/2013:14:25:40 -0500] “POST /wp-admin/admin-ajax.php HTTP/1.1” 200 199 “https://example.com/wp-admin/post-new.php” “Mozilla/5.0 Chrome/24” – – [29/Jan/2013:14:26:40 -0500] “POST /wp-admin/admin-ajax.php HTTP/1.1” 200 199 “https://example.com/wp-admin/post-new.php” “Mozilla/5.0 Chrome/24” – – [29/Jan/2013:14:27:40 -0500] “POST /wp-admin/admin-ajax.php HTTP/1.1” 200 199 “https://example.com/wp-admin/post-new.php” “Mozilla/5.0 Chrome/24”

Updated autosave settings to 5 minutes

After increasing the AUTOSAVE_INTERVAL to 300 seconds (5 minutes), you can see that the requests are now spaced 5 minutes apart: – – [29/Jan/2013:15:33:23 -0500] “POST /wp-admin/admin-ajax.php HTTP/1.1” 200 199 “https://example.com/wp-admin/post-new.php” “Mozilla/5.0 Chrome/24” – – [29/Jan/2013:15:38:23 -0500] “POST /wp-admin/admin-ajax.php HTTP/1.1” 200 199 “https://example.com/wp-admin/post-new.php” “Mozilla/5.0 Chrome/24”

You should now understand why WordPress could potentially use up excessive resources when you walk away from your computer in the middle of editing a page or post.

Another way to ensure that WordPress isn’t using up resources while you’re not doing anything is to be sure to log out of the WordPress admin dashboard when not in use, and also disabling the wp-cron.php script in WordPress.

InMotion Hosting Contributor

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Thoughts on “Disable WordPress autosave

  • Hi sir,

    I’m using Hotel master theme in that theme i’m not able to update the content or text..

    Top of the page it displaying as

    “There is an autosave of this post that is more recent than the version below. View the autosave”

    Its not allowing to update manually and its not upadate automatically also…

    Please help me to solve this problem



    • Hello Ranju,

      Sorry for the problem with the theme. Did you follow the directions above in disabling the autosave feature? If you have disabled it and you’re still having issues with the theme, then you may need to speak with the theme’s developer for recovering the theme. If you are not trying to recover any saved changes, then it may be in your best interest to delete and reload the theme.

      If you have any further questions or comments, please let us know.

      Arnel C.

  • Sometimes it seems like the people over at WordPress don’t use their brains very efficiently. Autosave every 1 minute? They didn’t think this might be a resource waster? Anything wrong with every 10 minutes?

  • Hello sir, Thank you for your informative post . recently Hostgator took my website down for excessive resources use and I am a newbie don’t know how to handle with these issue but your article is awesome and help me a lot to optimized my wordpress website.

    Thank you again.

Was this article helpful? Let us know!