Have you ever been in this situation? After investing a great deal of effort editing a blog post, something happens and you suddenly find that all of your hard work is now lost because you forgot to save it?
If this ever happens, there’s no need to panic! WordPress comes with a built-in autosave and post revision function that:
- Helps to prevent losing your work if you forget to save,
- Gets your page or post back if your browser crashes while you’re working, and,
- Lets you recover an older draft if you’re unhappy with the content in your article and would like to backtrack.
This step-by-step tutorial explains how to use the autosave and post recovery system of WordPress to save, recover, and restore content in your pages and posts.
WP Autosave & Post Revisions: Tutorial
Normally, when you edit and update a post or page, you will see a message like the one shown in the example below …
(Post updated notification)
Things can and do go wrong, however. For example:
- Your wi-fi is suddenly disconnected,
- Your internet browser freezes up,
- Power outages,
If you try to save your work, you may see a ‘WordPress Failure Notice’ like this displayed on your screen instead …
(WordPress Post Save Error Notice)
If you get the message “Are you sure you want to do this? Please try again” and click on ‘Please try again’, you will normally return to an edit screen displaying a previous version of your post, minus any recent changes.
This is where the built-in autosave feature of WordPress comes in handy.
Autosaves are stored in your site’s database as a special type of revision so they will not overwrite the post you are working on.
By default, posts are saved to the WordPress database every 60 seconds. This time interval can be changed by adding code to your wp-config.php file.
Always make a backup of your website before making any updates to website files.
If you don’t feel comfortable working with code, then get in touch for help.
If you were working on your post for a while and something happens (e.g. your browser crashes), a notice like this may come up when you return to editing your post …
Click on the ‘View the autosave’ link …
(’View the autosave’)
You will be taken to a page where a previously saved version of your post can be restored …
WordPress offers one-click restore of autosaved content. Click the ‘Restore This Autosave’ button …
(WordPress offers one-click restore)
Autosave restores the content you were previously working on …
(Autosave restores your latest post)
Autosave – Additional Information
Content Recovery – Session Expired
Sometimes, a ‘Session expired’ notification will appear …
(WordPress – session expired notice)
If your login session expires, WordPress remembers where you were. Log in again and pick up where you left off …
(Session expired notice)
WordPress also warns you if the backup of the post you are looking at is not the same as the version you see in the content editor and gives you the opportunity to restore the autosaved backup version.
Click on ‘Restore the backup’ …
WordPress recovers and restores your post from the browser backup …
(Post restored successfully from browser backup)
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 WP 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 losing internet connection. Source: WordPress 4.6 updates)
WordPress Post Revisions Feature – What Is It?
The Post Revisions feature was introduced in WordPress 2.6. Whenever a post or a page is saved, a revision of that post is automatically created and stored in the WordPress database.
After version 3.6, WordPress made significant improvements to its revision management function interface.
The new revision system also added new settings in the Publish box called Revisions. This allows you to immediately see how many revisions you have made to your content. and lets you bring up the ‘Compare Revisions’ page by clicking on the ‘Browse’ link …
(Publish Box – Revisions)
The Compare Revisions panel displays on your screen …
(Compare Revisions feature)
Note: This function is available for WordPress Posts and Pages.
When you compare revisions, a Revision Slider displays at the top of the screen, allowing you to move through different revisions. The more revisions you have, the more revision markers will appear in the slider …
(The more revisions, the longer the slider)
Revisions created by editing content and updating your post or page display in the slider highlighted in black, with the save interval, time, and date of the post revision …
Revisions saved automatically by WordPress show up in the revision slider in red, with the save interval, time, and date of the post revision …
(Autosave revision slider)
Revision Control – Options
You can navigate between sequential post revisions by moving the revision slider button right (newer) or left (older) …
(Move the revision slider button to the left or right)
There are also buttons to help you navigate between revisions.
Click ‘Previous’ to inspect past revisions …
(Compare Revisions – ‘Previous’ button)
Click ‘Next’ to compare more recent revisions …
(Compare Revisions – ‘Next’ button)
As well as comparing adjacent revisions, WordPress lets you compare different revisions by selecting the ‘Compare any two revisions’ box …
(’Compare any two revisions’ option)
Adjust the sliders independently to compare any two saved revisions …
(Compare any two revisions)
Choose the revision you want restored and click Restore This Revision …
(‘Restore This Revision’ button)
To exit, click on the title of your page/post …
(Click the title of your post to return)
You can also exit the Compare Revisions page without making any changes by clicking the ‘Return to editor’ link …
(Click to return to content editor)
WordPress Post Revisions – Plugins
As mentioned earlier, there are some changes you can make to the WordPress revisions feature such as changing the autosave interval and disabling the feature altogether, but these typically require making edits to code. If you are worried about working with code, then contact your web host or get professional assistance.
Let’s focus, then, on some additional areas of WordPress post revisions management that don’t require editing code.
Revisions List – Post Editor Section
As soon as you save your posts and pages, WordPress begins to store new revisions for the content in its database. These show up in a Revisions section below the post or page …
(Post Editor section – Viewing the WordPress post revisions box)
If you can’t see the Revisions list in the Post editor screen, click on the Screen Options tab at the top of your screen …
(Screen Options tab)
Enable the checkbox for ‘Revisions’ in the Boxes section …
(Screen Options tab – Revisions)
You should now see the Revisions box displayed under your content editor. Click any link to bring up the Compare Revisions page …
(Post Editor: Revisions Box)
Revision Management Plugins
Autosave and revisions are no doubt features that help create a more effective workflow. If you write or edit often, however, after a while the number of revisions can start to build 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)
For example, if you have 10 posts published on your site and each post has an average of 5 revisions you could be storing up to 500 copies of old data. If your post is approximately 100KB data, then with 500 revisions of that post, the total space wasted is about 50MB.
Fortunately, there are several plugins for WordPress to 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 and page revisions.
"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie