Have you ever been in a situation where, after spending a great deal of time editing a post, something happens and you suddenly find that you have lost all of your hard work because you forgot to hit the ‘Save’ button as you went along?
If this ever happens and your website or blog is powered by WordPress, don’t feel alarmed! WordPress has a powerful built-in autosave and revision function that:
- Helps to prevent losing your work if you forget to save,
- Gets your page or post back if something happens to your browser or computer while you’re working, and,
- Lets you recover an older version if you’re unhappy with the content in an article.
This step-by-step tutorial explains how to use the built-in autosave and post revision feature of WordPress to save, recover, and restore content in your pages and posts.
How To Use WordPress Post Revisions And Autosave: Step-By-Step Tutorial
Usually, after saving a post or page, you will see a message like this …
(Edit Post – Post updated successfully!)
Things can and do go wrong, however. For example:
- The internet goes down,
- Your browser crashes,
- You experience a temporary power outage,
When you try to save your work, you may end up seeing a ‘WordPress Failure Notice’ message like this instead …
(WordPress Post Save Error Message)
If you see a message that says “Are you sure you want to do this? Please try again” displayed and click on ‘Please try again’, you will normally return to a screen displaying an older version of your post, minus any changes that you recently made.
This is where the built-in WordPress autosave feature can help you work more effectively.
Autosaves are stored as a special type of revision in your site’s database so they won’t overwrite the post you are working on.
By default, posts are saved to the database every sixty seconds. This interval can be changed by adding code to your wp-config.php file.
Always make a complete backup of your website before updating website files.
If you are not confident working with code, then contact us for assistance.
If you have been working on your edits for a while and something happens (e.g. your browser crashes), you could see a There is an autosave of this post …’ notice like this when you go back to your post or page …
Click on the ‘View the autosave’ link …
The Revisions feature panel displays, allowing you to restore an autosaved version of your post …
(Compare Revisions panel)
Click the ‘Restore This Autosave’ button …
(WordPress offers one-click restore of autosaved content)
The content will be recovered using autosave …
(Autosave restores 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)
If your login session expires, WordPress remembers where you were. Log in again and continue working from 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 working on is not the same as the version showing in the editor and gives you the opportunity to restore your autosaved backup.
(’The backup of this post in your browser is different from the version below.’ notice)
Click Restore the backup …
(Edit Post – Restore post from browser backup)
WordPress restores your content from your browser backup …
(Your post is 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 …
(Recover content after losing internet connection. Source: WordPress 4.6 updates)
The Post Revisions feature was introduced in WordPress v. 2.6. Whenever you saves a page or post, a revision is automatically created and stored in your WP database.
After WordPress 3.6, WordPress made significant improvements to its post revision control function.
The new revision system now includes new settings in the Page/Post Publish box called Revisions. This automatically calculates how many revisions you have made. Click ’Browse’ to bring up the ‘Revisions’ feature panel …
(Publish Box – Revisions)
The Compare Revisions page comes up …
Note: This function works the same way on both Pages and Posts.
Comparing Revisions – Revision Slider
A Revision Slider allows you to move through your revisions. The more revisions you have saved, the more segmented your slider will be …
(The more revisions, the longer the slider)
When you make changes to content and update your page or post, your revisions display in the revision slider marked in black, with the save interval, time, and date of the revision …
Revisions saved automatically by WordPress display in the slider highlighted in red, along with the save interval, time, and date of the post revision …
How To Compare Revisions – Options
You can navigate between sequential revisions by moving the revision slider right (newer) or left (older) …
(Move the button to the right or left of the slider)
There are also buttons to help you navigate between revisions.
Click ‘Previous’ to review older post revisions …
(Click ‘Previous’ to browse previous revisions)
Click ‘Next’ to review later versions …
(Click ‘Next’ to view newer post revisions)
You can also compare two different revisions by ticking the ‘Compare any two revisions’ box …
(’Compare any two revisions’ checkbox)
You can adjust the buttons independently to compare any two saved revisions …
(Compare 2 post revisions)
Choose the version you want restored and click the ‘Restore This Revision’ button …
(’Restore This Revision’)
To go back to the content editor, click on the title of your post …
(Click on the title link to go back to the editor)
You can also return to the editor without making any changes by clicking Return to editor …
(Revisions – return to content editor)
WordPress Revisions – 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 involve modifying server files. If working with files inside your web server makes you feel a little worried, then contact your web host or get professional assistance.
Let’s focus, then, on some additional aspects of WordPress revisions control that don’t require messing around with code.
Post Editor Section – Viewing The Post Revisions Box
As soon as you create, edit, and update pages and posts, WordPress begins to store new revisions in its database. These show up in a Revisions list at the bottom of the post editor …
(Post Editor screen – Viewing the revisions list)
If the Revisions list isn’t visible, click the Screen Options tab at the top of the screen …
(Screen Options tab)
Make sure that the checkbox for ‘Revisions’ in the Boxes section is ticked …
(Screen Options tab – Revisions)
You will now see the Revisions list below your content editor section. Clicking any of the links will bring up the Revisions feature panel …
(Post Editor Screen: Revisions Box)
Managing Revisions Using Plugins
Having access to workflow features like autosave and automatic revisions is no doubt very useful. If you write and edit often, however, after a while the revisions can start building up. This can significantly grow the size of your WordPress database, so it’s important to also be able to manage your revisions.
(Your database could be storing lots of unnecessary data)
For example, if there are 200 posts on your site and each post has 15 revisions you could be storing up to 3,000 copies of old data. If your post averages 100KB data, then with 3,000 revisions, the total space wasted is about 300MB.
Fortunately, there are several free WordPress plugins that can help you control and manage your revisions and reduce the size of your WordPress 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 older post 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)