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