Adjust or Increase WordPress Autosave Interval For Blog Posts And Pages

What is WordPress Autosave Feature?

1. WordPress has a feature that when you edit the blog post or page, it automatically saves a copy of the post with recent changes each 60 seconds by default.

2. For each post autosaved, a new row is created in the WordPress ‘posts’ table. The most important thing is there is only one autosave copy for a particular post or a page, so that next time WordPress does an autosave, it overwrites the previous autosave revision. So no need to worry that ‘Wordpress Autosave’ is making the database bulky.

3. The new row is created only for a published post, in case the post is in ‘Draft’ status, then WordPress does not create a new row for the autosave revision, rather it directly updates the original post entry in the database.

4. The four fields of the post or page are saved in the autosave entry named Post Title, Post Content, Author and Post Excerpt. Plugins can add more fields to be saved in an autosave.

5. Autosaves are activated for all the WordPress blog posts and pages. I recommend not to disable autosave feature because it is extremely beneficial in case when you are in between editing a post and write so many crucial lines and finally discover that either your browser has crashed while typing or you have lost internet connection after pressing ‘Publish’ button. and now you have lost all the changes, a big loss of time and efforts! If you have Autosave enabled in such situation, then next time you come to edit the same post, you would get the message at the top that

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

=> which would have the link to autosaved revision of the post and an option to restore the original post from the autosave copy.

Why a need to Increase Autosave Interval?

You have typed the content somewhere else, and it is too big and you have pasted it to WordPress post editor. And now you are modifying the post. In this case, if the content is large, the autosave may take a minute or two depending on the size of the content, your internet connection speed, the server connection speed and other factors. And now again you get only 60 seconds for again editing the post before next autosave after which your editor on the browser would again hang up.

In such case you may feel to increase the time interval between the two wordpress autosaves and make it 300 seconds (5 minutes) or a bit more.

How to Increase WordPress Autosave Interval?

Go to your WordPress blog wp-config.php => At the end somewhere, you would get the below comment

/* That's all, stop editing! Happy blogging. */

Just before the above comment, put the below code

define('AUTOSAVE_INTERVAL', 300 );  // in seconds

Remember that the constant ‘AUTOSAVE_INTERVAL’ represents the delay between the two autosaves in seconds. Replace the value (300 seconds above) as per your requirement.

Post your comments in case you have some interesting findings or issues on WordPress autosave feature.

  • Hi Tejaswani,
    Thanks for sharing the useful information about WordPress. Auto save time setting is really important to any WordPress users.

  • It is necessary to increase auto save time or disable it completely. Thank you for sharing the information.

  • Pingback: uberVU - social comments()

  • @Surender Sharma Ya, I too believe that, it is a great feature if used intelligently.

  • Hey sanjeev, I need to disable it completely.

    Can you tell me, how can I do it?

  • Hi Aery,

    You can disable the Autosave option by adding below line of code in wp-config.php file.
    define(‘WP_POST_REVISIONS’, disable);

  • Hey sanjeev,

    Thanks for the reply.

    As expected, you never forget your readers cum friends and always come up with practical, feasible and best answer.

    Love u.

  • Oh my word….. THANK YOU SO MUCH for showing me how to control this feature! It was getting so annoying to me, because every time I wanted to add some text, or go to a location within my post, it would auto-save & bring me back to the top of the text… ANNOYING…

    I am so excited to try this new option that you have shared with us!

    Pearl