What is (and how to change) WordPress autosave + revisions

WordPress Autosave is one of my favorite WordPress features that gives us peace of mind while editing a post or page on WordPress. 

If you’ve worked with some other CMS where there is no autosave, you might have experienced that horrible moment, when as soon as you press “Save”, your login times out and you lose everything.

“Arrggghhhhhh!”

WordPress autosave prevents that tragic story, which has happened time and time again to so many people.

 

WordPress autosave

By default, WordPress Autosave automatically saves your post, page or a custom post type every 60 seconds once you updated your content.

This can be very handy to keep a copy the unsaved content which you may have otherwise lost due to different reasons such as expired cookies, browser crashes, loss of internet connection, unintentional navigation, WordPress core or plugin errors/crashes, etc.

In addition to automatically saving content to the database, WordPress Autosave (since recent WordPress versions) now also utilizes the local storage feature of your browser to prevent losing your content if you go offline unintentionally very quickly (such as sudden loss of power).

While the WordPress autosave feature can be a lifesaver for those who often edit their content in WordPress admin, it is up to the users to decide whether they need to enable the feature or not. The good news is you can either disable the feature or customize the saving interval as per your preference.

In this post, let’s take a detailed look at the WordPress autosave feature.

WordPress Autosave- How it works

When you’re writing or editing content, changes you make on your post will be automatically saved every 60 seconds.

When an autosave is updated, it will be seen as a notification in the lower right corner of your post editor.

See the screenshot below.

autosave

After autosaving, if your post is updated, the next autosave will overwrite the older ones. This means your table won’t grow by more than one every 60 seconds. Only one autosave is stored for each post.

This is quite different from when you actually press the Update button, where a new WordPress post “revisions” are created each time.

Now you might have already noticed this—when you try to close your browser tab without saving your post, you’ll see a warning pop up notifying you that post is not saved.

autosave popup 

The benefit of using WordPress autosave is that even if you left the tab without saving it, the first thing you’ll see in your post editor during the next login is the autosaved version of your post.

The best thing is autosave doesn’t overwrite your published posts or saved revisions. So you can start editing the autosaved post during your next login without any hassle.

Saving WordPress posts temporarily on browsers

Aside from saving your content in database, WordPress now utilizes the local storage feature of your browser if you go offline. It notifies you if it finds any difference when you return online.

local revision

This feature enables you to resume writing exactly where you left it.

Autosave makes WordPress a much better content editing tool

While WordPress is surely the best CMS out there, it still lags many content writing, content editing and collaboration features that of MS Word and Google docs.

Due to this fact, still many bloggers prefer creating a post offline or use Google docs for collaborative editing. Such user use WordPress admin only when the post is finished writing.

This creates more work for the editor and author of the site - the migrating of content from a document to WordPress takes quite a lot of time, because most of the formatting is lost along the way.

However, this enhanced WordPress autosave feature puts WordPress a step forward to become a reliable content editing tool.

If you’re still using a third-party application for content creation and collaboration, aside from WordPress autosave feature, below are a few reasons why WordPress admin could be a best alternative choice for you.  

WordPress post revisions: WordPress post revision allows you to compare between various versions of your saved post. This can be a lifesaver if you need to review previous versions of your posts (maybe if you’ve made changes by mistake). As of now, no other offline Word Processor offer this amazing feature. 

Recommended reading: Reduce the number of post revisions being stored on WordPress 

postlock 

Post lock: Since the 3.6 release, WordPress released a new editorial control feature called post lock. This allows the post author to lock a post until it is finished editing. This can be a helpful feature for multi-author blogs where authors collaboratively contribute each post.   

Better grammar checker: Although WordPress offers tons of post editor features it still lags a reliable grammar checking tool like that of MS Word. If that’s the reasons why you still use an offline Word Processing application, all you need to do is to install Grammarly browser add-on.

 grammarly

Grammarly is a free online grammar checker, which is a much better tool than MS Word when it comes to proofreading and grammar checking.

Undoubtedly, all these features will make WordPress a reliable content creation and editing tool.

How to change WordPress autosave interval

Now that we’ve looked at various benefits of WordPress autosave feature, let’s see how to change autosave interval as per your preference.

For instance, if you’re blogging using a slow internet connection, you may need to increase the autosave interval to ensure you browser doesn’t hang as frequently when WordPress forces an autosave every minute.

Alternatively, if you want to minimize the chances of losing content due to OS crashes or power loss, you may need to reduce the interval so WordPress saves your content more frequently.

Changing the WordPress autosave settings requires just a few tweaks.

If you’re looking to change the autosave interval simply find wp-config.php file of your WordPress site, insert the below code snippet on it and save it.

define('AUTOSAVE_INTERVAL', 120 );

The above code will change the autosave interval to 120 seconds. Feel free to edit the number in the above code (in seconds) as per your preference before saving.

Make sure to add the above code snippet before the following line of code in wp-config.php file, or else the setting has no effect. 

require_once(ABSPATH . 'wp-settings.php');

How to disable WordPress autosave feature

The beauty of WordPress is you can easily customize or disable almost every feature it offers.

In the rarest case, if you wish not to use WordPress autosave feature for your site, you can easily disable it by following the below guide.

In this section, you’ll find disabling autosave using two methods—by editing wp-config.php file and by editing functions.php file.

You may use any of the following methods to disable WordPress autosave feature.

Editing wp-config.php file to disable WordPress autosave

Editing wp-config.php file is probably the easiest way to disable WordPress autosave.

Although you can disable it by disabling WP_POST_REVISIONS, the problem with this method is that it will disable WordPress post revisions as well.

So the right method is to increase the autosave interval in wp-config.php file so it would never save anything automatically.

define('AUTOSAVE_INTERVAL', 86400); 

The above code snippet ensures that your post will be saved after 86400 seconds; that is after a day.

Disabling WordPress autosave by editing functions.php file

But really and truly why would you want to disable WordPress autosave huh?

The smartest method to disable this feature is by adding a few line of code to your functions.php file - what is called an action hook to your WordPress. Once you added the code, you may save the file.

add_action( 'admin_init', 'disable_autosave' );

function disable_autosave() {

    wp_deregister_script( 'autosave' );

} 

What it does is it simply deregisters the autosave script, which you can find in both wp-admin/post.php file and wp-admin/post-new.php files.

What is your take on WordPress autosave feature? Share your thoughts with us by dropping a line below.

One more thing...

Do you have friends or a Facebook group who you think would find this useful? Share this with them and then let me know what they think.

Want to supercharge your website?

 
Our website loads FAST ... just 1.29 seconds. We're hosted on FAST InMotion VPS servers We want YOUR website to be fast too, so we've gotten you an exclusive deal - 47% OFF for DART Creations friends + FREE domain! Check it out NOW!