Have you ever been in a situation where, after spending a great deal of time and effort composing a new blog post post, something happens and you suddenly find that you have lost all of your hard work because you didn’t hit the ‘Save’ button as you went along?
If this ever happens, there’s no need to feel dismayed! WordPress comes with a powerful autosave and content recovery feature that:
- Automatically saves your content,
- Can get your post or page content back if your web browser crashes while you’re working, and,
- Lets you restore an older draft if you changed the content in an article and would like to backtrack.
In this step-by-step tutorial, we explain how to use the built-in WordPress autosave and post revision management system to automatically restore content in your posts and pages.
The WordPress Autosave And Revisions Feature: Step-By-Step Tutorial
Usually, after updating a page or post, a notice like the one shown below will display …
(Post updated notice)
Sometimes things can and will go wrong, however. For example:
- Your modem gets disconnected,
- Your internet browser crashes,
- Power outages,
- A number of other reasons temporarily prevent you from publishing your post, etc.
When this happens and you try to save your work, you may end up seeing a message like this displayed on your screen instead …
(WordPress Failure Notice)
If you get a message that says Are you sure you want to do this? Please try again and click on ‘Please try again’, you will normally return to an editing screen displaying an earlier version of your post, minus any changes that you recently made.
This is where WordPress ‘autosave’ can help prevent grief and frustration.
The Autosave Function
The autosave function 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 your post in the database every sixty seconds. This time interval can be changed by adding code to your wp-config.php file.
Always make a full backup of your website before modifying website files.
If you feel nervous about editing code, feel free to get in touch for help.
If you have been working on your edits for a while and something happens (e.g. your internet connection temporarily drops), a message like this may come up when you go back to editing your post …
(Edit Post – Autosave notification)
Click on the link (‘View the autosave’) …
(’View the autosave’)
The Compare Revisions interface comes up, allowing you to recover a previously saved version of your post …
(Compare Revisions interface)
Click ‘Restore This Autosave’ …
(WordPress offers one-click post recovery of autosaved content)
The post will be restored using autosave …
(Autosave restores the content of your latest post)
Autosave – Additional Info
Content Recovery – Session Expired
Sometimes, your login session will simply expire while you are still working on content …
(WordPress – session expired notice)
If you get logged out, WordPress remembers where you were, so when you login again, you can pick up where you left off …
(Session expired notice – log in again to continue working)
WordPress also warns you if the backup of the post you are currently looking at is not the same as the version you see in the content editor and gives you the opportunity to restore your saved backup.
(Edit Post – Restore backup)
Click on ‘Restore the backup’ …
WordPress recovers and restores the post from your browser backup. You can also undo this operation by clicking the ‘Undo’ link …
(Your post has been restored!)
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)
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 …
(Content recovery after loss of internet connection. Source: WordPress 4.6 updates)
WordPress Revision Management Feature
Post Revisions were introduced to WordPress in version 2.6. Whenever WordPress saves a post or a page, it automatically creates a revision of that post and stores it in your WP database.
WordPress overhauled its post revision control system in WordPress 3.6.
The new revision system now includes a new option to the Post/Page Publish box called Revisions. This automatically calculates how many revisions you have made. Click ’Browse’ to quickly access the ‘Compare Revisions’ page …
(Publish Box – Revisions)
The Revisions area appears on your screen …
Note: WordPress revision control is the same for Posts and Pages.
How To Compare Revisions – Revision Slider
A Revision Slider allows you to move through different revisions. The more revisions you have saved, the more segmented your slider will be …
(The more revisions, the longer the slider)
When you edit content and update pages or posts, your revisions show up in the revision slider marked in black, with the save interval, time, and date of the post revision …
Revisions saved automatically by WordPress display in the revision slider marked in red, with the save interval, time, and date of the post/page revision …
Revision Control – Options
You can navigate between different post revisions by moving the slider right or left …
(Move the button to the left or right of the revision slider)
There are also buttons to help you navigate between revisions.
Click ‘Previous’ to compare earlier versions …
(Click ‘Previous’ to browse earlier revisions)
Click ‘Next’ to review your newer revisions …
(Compare Revisions – ‘Next’ button)
As well as comparing adjacent page/post revisions, WordPress lets you select and compare revisions by enabling the ‘Compare any two revisions’ box …
(’Compare any two revisions’ check box)
You can adjust the buttons to compare any two post revisions …
(Compare two different post revisions independently)
Find the revision you would like restored and click Restore This Revision …
(Click to restore revision)
To cancel the operation and go back to the current saved version of your page or post, click on the post or page title link …
(Click the title of your post to return)
You can also exit the Revisions feature by clicking Return to editor …
(Compare Revisions – return to post editor)
WordPress 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 disabling the feature altogether, but these typically involve modifying code in WordPress files. If editing files inside your server unnerves you, then contact your web host or get professional assistance.
Let’s focus, then, on some additional aspects of WordPress post revisions control that don’t require messing around with code.
Post Editor Screen – View The WordPress Revisions List
As soon as you update posts and pages, WordPress begins to store new revisions for the content in its database. You can see these displayed in a Revisions section below your post or page …
If the Revisions list isn’t visible in the Post editor screen, click on the Screen Options tab in the top right-hand corner of the screen …
(Screen Options tab)
Make sure that the box next to ‘Revisions’ in the Boxes section is checked …
(Screen Options tab – Revisions)
You will now see the Revisions box displayed under your content. Clicking any of the links will bring up the Compare Revisions page with related content for that item …
Revision Management WordPress Plugins
For most users, having autosave and revisions is no doubt a great thing. If you write and edit a lot of content, however, the revisions can start building up. This can significantly bloat the size of your WordPress database, so it’s important to be able to manage your revisions.
(Your WordPress database could be storing lots of unnecessary data)
For example, if you have 10 posts published on your site and each post has 5 revisions you could be storing around 500 copies of old data. If your post averages 100KB data, then with 500 revisions, the total database space wasted is about 50MB.
The good news is that there are various WordPress plugins 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 restore earlier post/page revisions.
"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)