Disable WordPress Autosave

Learn Disable WordPress Autosave

In this article, I’m going to teach you how you can disable or modify 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 every 60 seconds (every minute), so if you happen to start working on a new post and then you walked away from your computer those autosaves would continue to occur.

Note: 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.

How Does WordPress Autosave Work?

Autosave is a great feature if you forget to save what you are working on and your browser/WordPress/plugin crashes, since the next time you access your Dashboard you will be able to continue with the autosaved version. The classic editor used to save your changes as “revisions” that can be reverted if necessary. But the Gutenberg editor “autosaves” the page or post you have open and each autosave will overwrite the previous one.

Keep in mind that revisions are still available, but only if you update or save the page/post you are working on. For more information, see our full guide on how to limit or disable WordPress revisions.

WordPress will also encourage you to save your changes. For example, when you attempt to close your browser without saving a page or post first, a message will pop up confirming if you want to leave the site.

Save Page or Post Changes Before Leaving WordPress

Your content is also saved as a draft in your browser, so if you lose the connection to the internet or your website it will be saved locally as a draft. Once your connection is restored, you should see a message asking if you want to restore the backup from your browser version.

Restore Saved WordPress Backup From Local Browser

WordPress Autosave Results

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:

“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”

Cons of WordPress Autosave

The downside of the Autosave ability is that it can use or possibly “over-use” server resources. This is due to it persistently reconnecting to your server and saving the page or post you are working on.

If this is causing issues with your server, the solution is disabling or extending the interval your WordPress site autosaves at. Below we will go over the various methods that can be used to disable or limit the autosave ability.

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.

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

  1. Login to your cPanel.
  2. Access the cPanel File Manager Editor and navigate to your wp-config.php file.
  3. Enter in the the following code to the wp-config.php file after the line that says “Add any custom values between this line and the “stop editing” line.” In my WordPress site, this was around line 86:
    define('AUTOSAVE_INTERVAL', 86400);
  4. 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.

Disable WordPress Autosave With a Plugin

There is a plugin to disable autosave when using the Gutenberg editor, but keep in mind that this will not work if you are using the Classic editor. This is due to the way that autosave works as described above.

Once the plugin is installed, autosave will be disabled automatically. But you will have the ability to adjust the setting for each post or page you are editing.

  1. Install the Disable Gutenberg Autosave plugin by websevendev.
    Note: autosave is immediately disable upon activation of the plugin.
  2. Now when you edit a page or post you will see a clock with an arrow on the top-right of the page. Click this to choose your autosave interval.
    Choosing WordPress Autosave Interval
  3. Choose your autosave interval and it should save automaticaly.
    Selecting the Autosave Interval
  4. You can then click the X to exit out or click the Autosave now button.

Other Options for Disabling Autosave

With Custom Code

We have seen methods for disabling autosave with custom code by editing the functions.php file and using a “disable_autosave” function. We do not recommend using this method since changes to the functions.php file can be removed if the theme is upgraded.

With Javascript

Another option is to disable autosave in the Gutenberg editor using a custom javascript. The steps including the code are outlined in the following external guide.

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.

Looking for more guides? We have over 400 WordPress How To Articles to help you!

John-Paul Briones Content Writer II

John-Paul is an Electronics Engineer that spent most of his career in IT. He has been a Technical Writer for InMotion since 2013.

More Articles by John-Paul

19 thoughts on “Disable WordPress Autosave

  1. Thank You Soo much for this in-depth article I have disabled file editing does it affects SEO and search engine performance

  2. 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



    1. 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.

  3. 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?

  4. 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? Join the conversation!