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 Autosave & Post Revisions Feature

Have you ever been in this situation? After investing a great deal of time composing a new post, something crashes and you suddenly find that all of your hard work is lost because you did not remember to save it?

If this ever happens, then worry not! WordPress has a powerful autosave and content revision management system that:

  • Automatically saves earlier versions of your content,
  • Can get your page or post back if your web browser crashes while you’re working, and,
  • Lets you restore an earlier draft if you changed the content of your article and would like to backtrack.

In this tutorial, we will show you how to use the autosave and post revision system of WordPress to easily recover your posts and pages.

The WordPress Revisions And Autosave Feature: Step-By-Step Tutorial

Usually, whenever you edit and save a post or page, a message like the example shown below will display …

Edit Post - Post updated notice

(Post updated notification)

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

  • Your modem gets disconnected,
  • Your internet browser crashes,
  • Power outages,
  • etc.

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

WordPress Post Save Error Message

(WordPress Failure Notice)

When you see a message that says Are you sure you want to do this? Please try again displayed and click on the ‘Please try again’ link, you will normally return to a post/page edit screen displaying a previous version of your post, minus any recent changes.

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

WordPress Autosave

Autosaves are stored as a special type of revision so they will not overwrite the page or post you’re working on.

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

Important

We strongly recommend making a complete backup of your website before updating website files.

If you feel uncomfortable about working with code, then get in touch for help.

If you have been working on your post for a while and something happens (e.g. your internet connection goes down temporarily), you could see a There is an autosave of this post …’ message like the one shown below when you return to your post or page …

Autosave notification

(Edit Post – Autosave notice)

Click on the link to view the autosave …

Edit Post - Autosave notification

(’View the autosave’)

You will be taken to the Revisions section where an autosaved version of your post can be recovered …

Revisions screen

(Compare Revisions page)

Click ‘Restore This Autosave’ …

WordPress offers one-click content recovery

(WordPress offers one-click recovery of autosaved content)

Autosave recovers the content you were previously editing …

Post recovered from Autosave

(Post recovered from Autosave)

WordPress Autosave – Additional Information

Content Recovery – Session Expired

Sometimes, your login session will simply expire while you are in the middle of your work …

WordPress - session expired notice

(WordPress – session expired)

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

Session expired notice - log in again to continue working

(Session expired notice)

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

Edit Post - Restore post backup

(Edit Post – Restore backup)

Click Restore the backup

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

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

The post will be recovered and restored successfully from the browser backup. Click the ‘Undo’ link to revert to the previous version of your content …

Your post has been successfully restored!

(Your post has been successfully restored!)

Content Recovery – Loss Of Internet Connection

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

WordPress can help you 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

(Recover content after losing internet connection. Source: WordPress 4.6 updates)

What Are Post Revisions?

The Post Revisions feature was introduced in WordPress version 2.6. Whenever a WordPress post or a page is saved, it automatically creates a revision and stores it in the WordPress database.

WordPress introduced significant improvements to the revision control feature interface in WP version 3.6.

The new WordPress revision system now includes a new option to the Post/Page Publish box called Revisions. This lets you know at a glance how many revisions you have made. and lets you easily view the ‘Compare Revisions’ page by clicking on the ‘Browse’ link …

Publish Box - Revisions

(Publish Box – Revisions)

The Compare Revisions interface comes up …

Revisions page

(Compare Revisions feature)

Tip

Note: The revision control feature is the same for Posts and Pages.

How To Compare Revisions

A Revision Slider allows you to move through your revisions. The more revisions you have, the more revision markers you will see displayed in the slider …

The more revisions, the longer the slider

(The more revisions you have, the longer the slider will be)

When you make changes to content and update your post or page, your revisions show up in the slider highlighted in black, along with the save interval, time, and date of the post revision …

Revision

(Revision marker)

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

Revision slider - autosave

(Autosave revision slider)

Page/Post Revision Feature – Navigation

You can navigate between adjacent revisions by moving the revision slider right or left …

Move the revision slider to the left or right

(Move the button to the left or right of the revision slider)

There are also buttons to assist with navigation.

Click ‘Previous’ to inspect past post revisions …

Click 'Previous' to browse older post revisions

(Compare Revisions – ‘Previous’ button)

Click ‘Next’ to inspect newer revisions …

Compare Revisions - 'Next' button

(Compare Revisions – ‘Next’ button)

You can also compare any two revisions by ticking the ‘Compare any two revisions’ checkbox …

'Compare any two revisions' check box

(Compare any two revisions)

Adjust the sliders to compare any two versions …

Compare 2 post revisions independently

(Compare any 2 post revisions independently)

Choose the version you would like restored and click Restore This Revision

'Restore This Revision' button

(Click to restore post revision)

To exit, click on the post title …

Click on the title link to return

(Click the post title to go back)

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

Click to return to post editor

(Click to return to editor)

WordPress Post Revisions – Additional Notes

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 typically require making edits to server files. If you are worried about working with files inside your server, then contact your web host or get professional assistance.

Let’s focus, then, on some additional aspects of WordPress post revisions that don’t require editing code.

WordPress Revisions List

As soon as you create, edit, and save pages and posts, WordPress begins to store new post revisions in its database. These appear in a Revisions box at the bottom of your content editor …

Post revisions box

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

If the Revisions area isn’t visible in the Post editor screen, click on the Screen Options  tab at the top of your screen …

Screen Options tab

(Screen Options tab)

Tick the box for ‘Revisions’ in the Boxes section …

Post Editor: Screen Options tab - Revisions

(Screen Options tab – Revisions)

You should now see the Revisions box below the editor. Clicking any of the links will bring up the Revisions feature panel …

Post Editor Screen: Revisions Box

(Revisions Box)

Managing Post Revisions Using Plugins

Autosave and post revisions are no doubt functions that help make work more productive. If you write extensively, however, after a while the number of revisions can start building up. This can significantly bloat the size of your WordPress database, so it’s important to manage your revisions.

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

(Post revisions can really add up after a while)

For example, if there are 200 posts on your site with an average of 10 revisions each your WordPress database could be storing an extra 2,000 copies of unnecessary data. If your post averages 100KB data, then with 2,000 post revisions, the total database space wasted is about 200MB.

Fortunately, there are a few great plugins available that can 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 earlier revisions of your WordPress posts or pages.

WP Post Restore And Autosave

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)

***