Have you ever been in this situation? After spending a great deal of time and effort editing an article, something unexpected happens and you suddenly find that you have lost all of your hard work because you forgot to save it?
If this ever happens, there’s no need to despair! WordPress comes with a built-in autosave and post revision management system that:
- Automatically saves your content,
- Can get your page or post content back if something happens to your browser or computer while you’re working, and,
- Lets you restore an earlier version if you’re unhappy with the content of an article.
In this step-by-step tutorial, we show you how to use the WordPress autosave and post recovery system to save, recover, and restore your pages and posts while working on your content.
WordPress Autosave And Recovery: Tutorial
Generally, after saving a page or post, you will see a confirmation message like this …
(Post updated successfully!)
Like most things some things can go wrong, however. For example:
- The internet falls down,
- Your browser freezes up,
- You experience power outages,
- Other unknown reasons temporarily prevent you from saving your post, etc.
If this happens and you try to save your work, a ‘WordPress Failure Notice’ like this may end up being displayed instead …
(Are you sure you want to do this?)
If you the message “Are you sure you want to do this? Please try again” displays on your screen and you click on ‘Please try again’, you will normally go back to a post/page editing screen displaying an earlier version of your post, minus any recent changes.
This is where the autosave function of WordPress can bring you peace of mind.
Autosaves are stored in the WordPress database as a special type of revision so they will not overwrite the current page or post you are working on.
By default, posts are saved to the database every 60 seconds. This interval can be changed by modifying code in your wp-config.php file.
We recommend making a complete backup of your data and files before modifying your blog or website.
If you are concerned about editing files inside your web server, then get in touch for assistance.
If you were working for a while and something happens (e.g. your wi-fi connection goes down temporarily), you may see a There is an autosave of this post …’ notification like the one shown below when you go back to your post …
(Edit Post – Autosave notice)
Click on the ‘View the autosave’ link …
(View the autosave)
You will be taken to the Revisions feature where an autosaved version of your post can be recovered …
(Compare Revisions feature panel)
WordPress offers one-click recovery of autosaved content. Click the ‘Restore This Autosave’ button …
(WordPress offers one-click recovery of autosaved content)
The content you were previously working on will be restored using autosave …
(Post revision restored with Autosave)
Autosave – Additional Notes
Content Recovery – Session Expired
Sometimes, you will get a ‘Session expired’ notification …
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 currently working on is different from the version showing in the editor and gives you the opportunity to restore your saved backup.
(Edit Post – Restore backup of post saved in browser)
Click on ‘Restore the backup’ …
WordPress restores your content from your 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 …
(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)
Revision Management Function
Post Revisions are a feature that was introduced in WordPress v. 2.6. Whenever a page or post is saved in WordPress, it automatically creates a revision of that post and stores it in the WP database.
Significant enhancements were made to the revision control system interface after version 3.6.
The new WordPress revision system now includes a new option to the Publish box called Revisions, which allows you to immediately see how many revisions you have made. Click on the ‘Browse’ link to bring up the ‘Compare Revisions’ panel …
(WordPress automatically records all changes you make)
The Compare Revisions section loads on your screen …
(Compare Revisions interface)
Note: The post revision management function is the same for both Posts and Pages.
How To Compare Revisions – Revision Slider
A Revision Slider displays at the top of the screen, allowing you to move through different revisions. The more revisions you have saved, the more revision segments you will see displayed in the slider …
(The more revisions, the longer the slider)
Revisions created by making changes to content and updating your post or page appear in the revision slider in black, with the save interval, time, and date of the post revision …
When WordPress automatically saves your post or page, your revisions appear in the revision slider marked in red, along with the save interval, time, and date of the post revision …
(Revision slider – autosave)
Revision Management – Options
To navigate between revisions, move 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 scroll back through older post versions …
(Click ‘Previous’ to browse previous post revisions)
Click ‘Next’ to compare newer versions …
(Compare Revisions – ‘Next’ button)
You can also compare revisions by ticking the ‘Compare any two revisions’ box …
(’Compare any two revisions’ check box)
This lets you adjust two sliders independently to compare any two revisions …
(Compare 2 different revisions independently)
Choose the revision you want to restore and click the ‘Restore This Revision’ button …
(’Restore This Revision’)
To go back to the content editor without restoring any revisions, click on the title link of your page or post …
(Click the post title to return to the editor)
You can also leave the Compare Revisions feature without making any changes by clicking on Return to editor …
(Click to return to editor)
WordPress Post Revisions Control – Plugins & Additional Information
As mentioned earlier, there are some changes you can make to the WordPress revisions feature such as changing the autosave interval or disabling the feature altogether, but these generally require modifying code in core installation files. If editing code makes you feel a little uncomfortable, then contact your web host or get professional assistance.
Let’s focus, then, on some additional areas of WordPress post revisions that don’t require editing code.
WordPress Post Revisions List
As soon as you update a post or page, WordPress begins to store new revisions in its database. These appear in a Revisions section at the bottom of the page or post …
(Revisions box – Post Editor screen)
If you can’t see the Revisions box, 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 checked …
(Post Editor: Screen Options tab – Revisions)
You will now see the Revisions list displayed under the editor. Clicking the links will bring up the Revisions screen …
Managing Revisions – WordPress Plugins
Autosave and post revisions are no doubt features that help create a more productive workflow. If you write or edit often, however, the revisions can start to build up. This can significantly grow 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 there are 200 posts published on your site with an average of 10 revisions each your WordPress database could be storing around 4,000 copies of old data. If your post is approximately 100KB data, then with 4,000 revisions of that post, the total space wasted is about 400MB.
Fortunately, there are several 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 restore earlier saved post revisions.
"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now