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 …

Using The Post Revisions Function Of WordPress

Have you ever experienced a situation where, after investing a great deal of time and effort editing an article, something unexpected happens and you suddenly find that all of your hard work is now gone because you forgot to hit the ‘Save’ button as you went along?

If this ever happens and your website is built using WordPress, then worry not! WordPress has a built-in autosave and post revision function that:

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

In this tutorial, we show you how to use the built-in WordPress autosave and revision system to automatically restore content in your pages and posts.

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

Normally, after updating a page or post, you will see a notice like this …

Edit Post - Post updated message

(Post updated notification)

WordPress post revisions ensure that your content is periodically saved, allowing you to restore earlier revisions of your posts if an unlikely event should happen, for example:

  • Your modem is disconnected,
  • Your browser freezes up,
  • You’re struck by a power outage,
  • etc.

When this happens and you try to save your work, you may see a ‘WordPress Failure Notice’ message like this instead …

WordPress Failure Notice

(Are you sure you want to do this?)

When you get the message “Are you sure you want to do this? Please try again” and click on ‘Please try again’, you will normally be taken back to a page or post edit screen displaying an older version of your post, minus any changes that you recently made.

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

The Autosave Function

Autosaves are automatically enabled for all WordPress pages and posts, but this does not overwrite any published content.

By default, WordPress automatically saves your post in the database every 60 seconds. This interval can be changed by adding code to your wp-config.php file.

Important

Always make a complete backup of your website before modifying website files.

If you feel worried about editing code, then contact us for assistance.

If you were working on your edits for a while and something happens (e.g. your browser crashes), a There is an autosave of this post …’ warning like this may come up when you get back to your post or page …

Edit Post - Autosave notice

(Autosave notification)

Click on ‘View the autosave’ …

'View the autosave' link

(Click to view the autosave)

The Compare Revisions area appears, allowing you to recover a previously saved version of your article …

Revisions feature

(Revisions section)

Click Restore This Autosave

WordPress offers one-click post recovery

(WordPress offers one-click content recovery)

Autosave restores the content of your latest post …

Post revision restored from Autosave

(Post restored from Autosave)

Autosave – Additional Information

Content Recovery – Session Expired

Sometimes, you will see a ‘Session expired’ message …

WordPress - session expired

(Session expired)

If your login session expires, WordPress remembers where you were. This allows you to log in again and continue working from where you left off …

Session expired notice

(Session expired notice)

WordPress also warns you if the backup of the post you are working on is different from the version displayed in the editor and gives you the opportunity to restore your autosaved backup version.

Edit Post - Restore post backup

(Edit Post – Restore backup of post from browser)

Click Restore the backup

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

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

Your content will be recovered successfully from the browser backup …

Your post is now 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 WordPress 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 …

Content recovery after loss of internet connection

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

Revision Management

Post Revisions are a feature that was introduced to WordPress in 2.6. Whenever you saves a page or post, it automatically creates a revision and stores it in your WordPress database.

After WordPress 3.6, WordPress made significant improvements to its revision management system.

The new revision system now includes new settings in the Post/Page Publish box called Revisions, which lets you know at a glance how many revisions you have made to your content. Click the ‘Browse’ link to bring up the ‘Revisions’ panel …

WordPress records all changes you make

(WordPress keeps a record of all changes you make)

The Revisions feature loads in your browser …

Revisions section

(Revisions feature)

Useful Tip

Note: This function works the same way on both Posts and Pages.

How To Compare Revisions

A Revision Slider allows you to move through different saved revisions. The more revisions you have, the more segmented your slider will be …

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

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

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

Revision slider

(Revision)

When WordPress automatically saves your post or page, your revisions display in the revision slider highlighted in red, with the save interval, time, and date of the post/page revision …

Autosave revision

(Autosave revision slider)

How To Compare Revisions – Using The Revision Slider

To navigate between sequential revisions, move the slider right or left …

Move the revision slider button to the left or right

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

There are also buttons to help you navigate between revisions.

Click ‘Previous’ to inspect earlier versions …

Compare Revisions - 'Previous' button

(Click ‘Previous’ to view previous post revisions)

Click ‘Next’ to review newer versions …

Compare Revisions - 'Next' button

(Compare Revisions – ‘Next’ button)

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

Compare any two revisions

(Compare any two revisions)

You can adjust the buttons to compare any two post revisions …

Compare any two post revisions

(Compare 2 different post revisions independently)

Find the revision you want restored and click the ‘Restore This Revision’ button …

'Restore This Revision' button

(‘Restore This Revision’ button)

To cancel the operation and exit, click on the title of your page or post …

Click the post title to return

(Click the title of your post to exit)

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

Revisions - return to post editor

(Click to return to post editor)

WordPress Revisions – Plugins & Additional Information

As mentioned earlier, there are some changes you can make to the WordPress revisions function such as changing the autosave interval or disabling the feature altogether, but these generally require making modifications to WordPress files. If you are worried about editing code, 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 coding skills.

Post Editor Screen – View The Post Revisions List

As soon as you edit and save your posts and pages, WordPress begins to store new revisions in its database. These appear in a Revisions section below your content editor …

Viewing the revisions box - Post Editor screen

(Post Editor section – View the Post revisions list)

If you can’t see the Revisions box, click on the Screen Options  tab at the top right-hand corner of the screen …

Screen Options tab

(Post Editor – Screen Options tab)

Make sure that the option for ‘Revisions’ in the Boxes section is checked …

Post Editor: Screen Options tab - Revisions

(Post Editor: Screen Options tab – Revisions)

You will now see the Revisions list displayed under your content. Clicking the links will bring up the Compare Revisions feature with related content for the item …

Revisions Box

(Post Editor: Revisions Box)

Revision Management WordPress Plugins

For most WordPress users, having features like autosave and automatic revisions is no doubt a good thing. If you write or edit a lot of content, however, the number of revisions can start building up. This can significantly increase the size of your WordPress database, so it’s important to manage your revisions.

Post revisions can really add up after a while

(Post revisions can really add up after a while)

For example, if there are 300 posts published on your site and each post has 20 revisions you could be storing up to 6,000 copies of unnecessary data. If your post is approximately 100KB data, then with 6,000 post revisions, the total space wasted is about 600MB.

Fortunately, there are several WordPress plugins available to help you control and manage 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 recover earlier revisions of your WordPress posts and pages.

Using WP Revisions And Autosave

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum