Have you ever experienced this situation? 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 save it?
If this ever happens, there’s no need to worry! WordPress comes with an autosave and revision system that:
- Helps to prevent losing your work if you forget to save,
- Gets your post or page back if your browser crashes while you’re working, and,
- Lets you recover an earlier version if you’re unhappy with the content in an article and would like to backtrack.
This step-by-step tutorial explains how to use the built-in autosave and post recovery management system of WordPress to automatically recover your pages and posts while working on your content.
Post Revisions & Autosave Feature Of WordPress: Tutorial
Generally, after updating a page or post, a confirmation notice like this will display …
(Post updated successfully!)
Things can and do go wrong, however. For example:
- The internet suddenly goes down,
- Your web browser crashes,
- A power outage occurs,
- Other unknown reasons temporarily prevent you from saving a new post, etc.
When you try to save your work, you might see a ‘WordPress Failure Notice’ like this instead …
(Failure Notice – WordPress)
When you the message Are you sure you want to do this? Please try again displays on your screen and you click on the ‘Please try again’ link, you will normally go back to a screen displaying an older version of your post, minus any changes that you recently made.
This is where the autosave feature of WordPress becomes useful.
Autosaves are stored as a special kind of revision in the WordPress database so they will not overwrite the current page or post you are working on.
By default, posts are automatically saved to your database every sixty seconds. This interval can be changed by adding code to your wp-config.php file.
We strongly recommend making a backup of your site files and database before modifying any files on your blog or website.
If you don’t feel comfortable working with code, feel free to contact us for help.
If you have been working for a while and something happens (e.g. your browser crashes), you may see a warning like this when you get back to editing your post or page …
(Edit Post – Autosave notification)
Click on the link to view the autosave …
The Compare Revisions interface appears, allowing you to recover a previously saved version of your post …
WordPress offers one-click recovery. Click Restore This Autosave …
(WordPress offers one-click restore of autosaved content)
The content of your latest post revision will be recovered from autosave …
(Autosave restores your post)
WordPress Autosave – Additional Notes
Content Recovery – Session Expired
Sometimes, your login session will simply expire …
(WordPress – session expired)
If your login session expires, WordPress remembers where you were, so when you log in again, you can 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 showing in the editor and gives you the opportunity to restore your saved version.
Click on ‘Restore the backup’ …
WordPress recovers and restores the content from your browser backup …
(Post restored successfully!)
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 losing internet connection. Source: WordPress 4.6 updates)
What Are WordPress Post Revisions?
The Post Revisions feature was introduced in WordPress 2.6. Whenever a post or a page is saved in WordPress, a revision is automatically created and stored in your WP database.
WordPress overhauled its post/page revision control feature from WP 3.6.
The new WordPress revision system included new settings in the Page/Post Publish box called Revisions, which allows you to know at a glance how many revisions you have made to your page/post. Click ’Browse’ to bring up the ‘Compare Revisions’ page …
(Publish – Revisions)
The Revisions section comes up …
(Compare Revisions section)
Note: This feature is available for WordPress 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, the more revision markers you will see displayed in the slider …
(The more revisions, the longer the slider)
When you make changes to content and update your post or page, your revisions display in the revision slider in black, along with the save interval, time, and date of the post revision …
When WordPress automatically saves your post or page, your revisions appear in the slider marked in red, along with the save interval, time, and date of the post revision …
(Autosave revision slider)
How To Compare Revisions – Using The Revision Slider
You can navigate between sequential post revisions by moving the revision slider button right or left …
(Move the revision slider button to the left or right)
There are also buttons that help you compare the revisions.
Click ‘Previous’ to view past revisions …
(Click ‘Previous’ to browse earlier post revisions)
Click ‘Next’ to inspect your newer versions …
(Click ‘Next’ to view more recent revisions)
You can also compare different revisions by selecting the ‘Compare any two revisions’ box …
(Compare any two revisions)
You can adjust the buttons to compare any two saved revisions …
(Compare different revisions independently)
When you find the saved version you want restored, click Restore This Revision …
(‘Restore This Revision’ button)
To exit and return to the content editor, click on the title of your post or page …
(Click on the title link to go back to the editor)
You can also go back to the post editor by clicking on Return to editor …
(Compare Revisions – return to editor)
WordPress Post Revisions Feature – Plugins
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 generally involve making edits to WordPress files. If working with files inside your server makes you worried, 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.
Post Editor Section – The WordPress Post Revisions Box
As soon as you create, edit, and update a post or page, WordPress begins to store new revisions for the content in its database. These show up in a Revisions box at the bottom of your page or post …
(Post Editor screen – Viewing the WordPress post revisions box)
If you can’t see the Revisions box, click on the Screen Options tab in the top right-hand corner of the screen …
(Screen Options tab)
Tick the box for ‘Revisions’ in the Boxes section …
(Post Editor: Screen Options tab – Revisions)
You will now see the Revisions list displayed under your content. Click any of the links to bring up the Revisions page …
(Post Editor: Revisions Box)
Managing Revisions Using Plugins
Having access to content workflow functions like autosave and revisions is a good thing. If you write or edit a lot of content, however, the number of revisions can start building up. This can significantly increase the size of your WordPress database, so it’s important to also be able to manage your revisions.
(Post revisions can really add up after a while)
For example, if there are 100 posts on your site with an average of 10 revisions each your WordPress database could be storing up to 1,000 copies of unnecessary data. If your post is approximately 100KB data, then with 1,000 revisions of that post, the total space wasted is about 100MB.
Fortunately, there are a number of plugins 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 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