Have you ever experienced this situation? After spending a great deal of time editing a post, something happens and you suddenly find that all of your hard work is lost because you forgot to save it?
If this ever happens and you use WordPress, don’t despair! WordPress comes with an autosave and content recovery feature that:
- Helps you prevent losing your work if you forget to save,
- Gets your post or page content back if your web browser crashes while you’re working, and,
- Lets you recover an older version if you changed the content of an article and would like to backtrack.
In this step-by-step tutorial, we will show you how to use the built-in autosave and post revision management system of WordPress to save, recover, and restore your posts and pages.
Content Restore And Autosave Feature Of WordPress: Step-By-Step Tutorial
Usually, after updating a post or page, a confirmation message like this will display …
(Post updated notice)
WordPress post revisions ensure that your content is periodically saved, allowing you to undo changes to your drafts and revert back to previous post revisions if unexpected events happen, for instance:
- Your internet connection goes down,
- Your web browser freezes up,
- You experience a temporary power outage,
- Internet “gremlins” temporarily prevent you from saving your post, etc.
When this happens and you try to save your work, you may see a message like this displayed on your screen instead …
(Failure Notice – WordPress)
If you a message that says “Are you sure you want to do this? Please try again” appears on your screen and you click on the ‘Please try again’ link, you will normally be taken back to a post/page edit screen displaying an earlier version of your post, minus any recent changes.
This is where WordPress ‘autosave’ can help to avert disaster.
Autosaves are automatically enabled for all WordPress posts and pages, but this does not overwrite your published content.
By default, WordPress saves your post in the WordPress database every sixty seconds. This time interval can be changed by modifying code in your wp-config.php file.
We recommend making a complete backup of your website before updating important website files.
If working with code makes you worried, then get in touch. We’ll be glad to help you.
If you were working for a while and something happens (e.g. your browser crashes), you could see a There is an autosave of this post …’ message like this when you get back to editing your post or page …
Click on the ‘View the autosave’ link …
The Compare Revisions section comes up, allowing you to restore a previously saved version of your article …
(Compare Revisions screen)
Click Restore This Autosave …
(WordPress offers one-click recovery of autosaved content)
Your post will be restored using autosave …
(Autosave restores the content of your latest post)
WordPress Autosave – Additional Notes
Content Recovery – Session Expired
Sometimes, you will get a ‘Session expired’ notification …
(Session expired notice)
If you get logged out, 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 working on is different from the version displayed in the editor and gives you the opportunity to restore your autosaved backup version.
(’The backup of this post in your browser is different from the version below.’ notice)
Click Restore the backup …
(Restore post from browser backup)
Your content will be restored from the browser backup …
(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)
Another improvement made after version 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)
WordPress Post Revision Management Function
The Post Revisions feature was introduced to WordPress in v. 2.6. Whenever a post or a page is saved, it automatically creates a revision of that post and stores it in your WP database.
Significant improvements were made to the revision management feature interface after WordPress version 3.6.
The new WordPress revision system also added new settings in the Post/Page Publish box called Revisions, which automatically calculates how many revisions you have made to your content. and allows you to bring up the ‘Compare Revisions’ feature panel by clicking the ‘Browse’ link …
(WordPress saves all changes made)
The Compare Revisions work area comes up …
(Compare Revisions interface)
Note: This function is the same for both Posts and Pages.
Comparing Revisions – Revision Slider
A Revision Slider displays at the top of the screen, allowing you to move through different saved revisions. The more revisions you have saved, the longer your slider will be …
(The more revisions, the longer the slider)
When you make changes to content and update pages or posts, your revisions appear in the slider highlighted in black, with the save interval, time, and date of the revision …
Revisions saved automatically by WordPress show up in the revision slider in red, along with the save interval, time, and date of the post revision …
(Revision slider – autosave)
How To Compare Revisions – Options
To navigate between revisions, move the revision slider left (older) or right (newer) …
(Move the revision slider to the right or left)
There are also buttons to help you navigate between revisions.
Click ‘Previous’ to move through older post revisions …
(Click ‘Previous’ to view previous revisions)
Click ‘Next’ to advance through more recent versions …
(Compare Revisions – ‘Next’ button)
In addition to comparing sequential revisions, WordPress lets you compare different revisions by ticking ‘Compare any two revisions’ …
(Compare any two revisions)
You can adjust the slider buttons to compare any two revisions …
(Compare any 2 revisions)
Choose the revision you want restored and click the ‘Restore This Revision’ button …
(‘Restore This Revision’ button)
To cancel the operation and exit, click the post or page title …
(Click on the post title to exit)
You can also exit without making any changes by clicking Return to editor …
(Compare Revisions – return to post editor)
WordPress Post Revisions Function – 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 usually involve making edits to code in WordPress files. If you are not comfortable 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 messing around with code.
The WordPress Revisions Box – Post Editor Screen
As soon as you save posts and pages, WordPress begins to store new revisions in its database. You can see these displayed in a Revisions box below the page or post …
(The WordPress post revisions list)
If you can’t see the Revisions box, click the Screen Options tab near the top right-hand corner of the screen …
(Post Editor – Screen Options tab)
Select the box for ‘Revisions’ in the Boxes section …
(Screen Options tab – Revisions)
You will now see the Revisions box displayed under your content editor. Clicking the links will bring up the Revisions feature …
Managing Content Revisions – WordPress Plugins
Autosave and post revisions are no doubt functions that help make work more productive. If you write and edit extensively, however, the number of revisions can start to build 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 200 posts on your site and each post has 20 revisions you could be storing up to 4,000 copies of unnecessary data. If your post averages 100KB data, then with 4,000 post revisions, the total space wasted is about 400MB.
The good news is that there are some really great (and free) plugins available to help you 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 and page revisions.
"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)