How To Use WordPress Autosave And Post Revisions

Learn how to use the WordPress autosave and post revisions feature to restore and recover content revisions in your posts and pages …

The WordPress Post Restore & Autosave Feature

Have you ever found yourself in a situation where, after spending a great deal of effort editing a blog post, something crashes and you suddenly find that you have lost all of your hard work because you forgot to save it?

If this happens, don’t panic! WordPress comes with a powerful autosave and posts revision function that:

  • Automatically saves your pages and posts,
  • Gets your page or post content back if something happens to your computer or browser while you’re working, and,
  • Lets you recover an older draft if you’re unhappy with the content in an article.

This step-by-step tutorial explains how to use the WordPress autosave and content recovery function to automatically recover your posts and pages while working on your content.

How To Use The Autosave And Post Recovery Feature Of WordPress: Tutorial

Typically, after saving a post or page, a confirmation message like the one shown in the example below will display …

Edit Post - Post updated message

(Post updated message)

Things can and do go wrong, however. For example:

  • Your modem gets temporarily disconnected,
  • Your internet browser freezes up,
  • You experience a power outage,
  • Other unknown reasons temporarily prevent you from publishing a new post, etc.

When you try to save your work, a ‘WordPress Failure Notice’ message like this may end up being displayed on your screen instead …

Are you sure you want to do this?

(Failure Notice – WordPress)

If you get a message that says Are you sure you want to do this? Please try again and click on the ‘Please try again’ link, you will normally be taken back to a screen displaying an earlier version of your post, minus any recent changes.

This is where WordPress ‘autosave’ can help prevent a disaster.

The Autosave Function Of WordPress

Autosave is automatically enabled for all WordPress posts and pages, but this does not overwrite any content that has already been published.

By default, WordPress saves the current version of your post in the database every sixty seconds. This time interval can be changed by adding code to your wp-config.php file.

Important

Always make a backup of your site files and database before modifying website files.

If you feel uncomfortable about editing code, feel free to get in touch for assistance.

If you have been working for a while and something happens (e.g. your browser crashes), you may see a There is an autosave of this post that is more recent than the version below’ warning like this when you go back to your post or page …

Autosave notification

(Autosave notification)

Click on the ‘View the autosave’ link …

'View the autosave'

(View the autosave)

You will be taken to a page where a previously saved version of your post can be restored …

Revisions section

(Revisions area)

WordPress offers one-click restore. Click the ‘Restore This Autosave’ button …

WordPress offers one-click recovery of autosaved content

(WordPress offers one-click post/page recovery)

Autosave restores the content you were previously working on …

Autosave restores the content of your latest post

(Post content recovered with Autosave)

Autosave – Additional Info

Content Recovery – Session Expired

Sometimes, a ‘Session expired’ notification will appear …

Session expired notice

(Session expired)

If your login session expires, WordPress remembers where you were. Login again and pick up where you left off …

Session expired notice - log in again to continue working

(Session expired notice – log in again to continue working)

WordPress also warns you if the backup of the post you are currently working on is not the same as the version you see in the editor and gives you the opportunity to restore the saved backup.

'The backup of this post in your browser is different from the version below.' notice

(’The backup of this post in your browser is different from the version below.’ notice)

Click on ‘Restore the backup’ …

Browser backup

(Restore post from browser backup)

WordPress recovers the post from your browser backup. Click ‘Undo’ to undo this operation …

Your post has been successfully restored!

(Post restored successfully!)

Content Recovery – Loss Of Internet Connection

WordPress can also help you recover content if you lose your internet connection …

Recover content if you lose your internet connection

(Recover content if you lose your internet connection)

Another improvement made after v. 4.6 is content recovery from loss of connection. If you lose your internet connection while writing, your drafts are saved locally to your browser. When you return to edit, WordPress notifies you if there is a more recent draft, allowing you to restore the most recent version of your content …

Recover content after loss of internet connection

(Content recovery after loss of internet connection. Source: WordPress 4.6 updates)

Post Revision Management

Post Revisions were introduced in WordPress v. 2.6. Whenever a WordPress page or post is saved, it automatically creates a revision and stores it in your WordPress database.

After WP 3.6, WordPress made significant enhancements to its content revision management function.

The new revision system included new settings in the Publish box called Revisions. This lets you immediately know how many revisions you have made. and allows you to easily access the ‘Compare Revisions’ page by clicking on the ‘Browse’ link …

WordPress keeps track of all changes

(Publish – Revisions)

The Compare Revisions panel comes up …

Revisions interface

(Compare Revisions feature)

Useful Tip

Note: The post revision control function is available for WordPress Posts and Pages.

Comparing Revisions – Revision Slider

A Revision Slider displays at the top of the screen, allowing you to move through your saved revisions. The more revisions you have saved, the more segmented the slider will be …

The more revisions you have saved, the more revision segments will appear in the slider

(The more revisions you have saved, the more revision segments you will see displayed in the slider)

Revisions created by editing content and updating your page or post show up in the revision slider marked in black, along with the save interval, time, and date of the post/page revision …

Revision slider

(Revision)

Revisions saved automatically by WordPress show up in the slider marked in red, with the save interval, time, and date of the revision …

Autosave

(Autosave revision slider)

Comparing Revisions – Using The Revision Slider

You can navigate between revisions by moving the slider button right (newer) or left (older) …

Move the button to the left or right of the slider

(Move the revision slider to the right or left)

There are also buttons to help you navigate between revisions.

Click ‘Previous’ to view previous versions …

Click 'Previous' to browse previous revisions

(Compare Revisions – ‘Previous’ button)

Click ‘Next’ to advance through your newer revisions …

Click 'Next' to browse newer revisions

(Compare Revisions – ‘Next’ button)

You can also select and compare different revisions by checking the ‘Compare any two revisions’ box …

Compare any two revisions

(’Compare any two revisions’ option)

This lets you adjust two sliders independently to compare any two revisions …

Compare different revisions

(Compare 2 different post revisions independently)

When you find the revision you would like restored, click the ‘Restore This Revision’ button …

Click to restore revision

(’Restore This Revision’)

To exit without restoring a revision, click on the title of your page/post …

Click the title of your post to return to the editor

(Click the post title link to go back to the editor)

You can also leave the Revisions page without making any changes by clicking the ‘Return to editor’ link …

Compare Revisions - return to editor

(Revisions – return to editor)

WordPress Post Revisions Feature – Plugins

As mentioned earlier, there are some changes you can make to the WordPress revisions function such as changing the autosave interval or even disabling the feature altogether, but these generally require modifying code in WordPress files. If you feel hesitant about editing files inside your web server, then contact your web host or get professional assistance.

Let’s focus, then, on some additional aspects of WordPress post revisions feature that don’t require coding skills.

WordPress Post Revisions Box – Post Editor Screen

As soon as you edit and update your pages and posts, WordPress begins to store new revisions for the content in its database. These appear in a Revisions section below your page or post …

Viewing the WordPress revisions box

(Post Editor screen – Viewing the WordPress post revisions list)

If the Revisions box isn’t visible, click the Screen Options  tab near the top of the screen …

Post Editor - Screen Options tab

(Screen Options tab)

Make sure that the box for ‘Revisions’ in the Boxes section is ticked …

Screen Options tab - Revisions

(Screen Options tab – Revisions)

You will now see the Revisions box under the editor section. Clicking any of the links will bring up the Revisions panel with saved data for the item …

Revisions Box

(Post Editor: Revisions Box)

Managing Post Revisions – WordPress Plugins

For most users, having features like autosave and revisions is undoubtedly something that can help make work more productive. If you write and edit often, however, the revisions can start to build up. This can significantly grow the size of your WordPress database, so it’s important to be able to manage your revisions.

Post revisions can really add up after a while

(As post revisions accumulate, your database could be storing lots of unnecessary data)

For example, if you have 200 posts published on your site with an average of 10 revisions each your database could be storing an extra 4,000 copies of old data. If your post averages 100KB data, then with 4,000 revisions of that post, the total space wasted is about 400MB.

Fortunately, there are several free plugins to help you control your revisions and reduce the size of your database.

To learn more about WordPress plugins that will help you manage your post revisions, go here:

Congratulations! Now you know how to use the WordPress Revisions feature to restore older versions of your WordPress pages or posts.

How To Use The Post Revisions Feature Of WordPress

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)

Originally published as How To Use WordPress Autosave And Post Revisions.