Have you ever been in this situation? After investing a great deal of effort composing an article, something crashes and you suddenly find that all of your hard work is now gone because you didn’t hit the ‘Save’ button as you went along?
If this happens, then worry not! WordPress comes with a built-in autosave and content revision function that:
- Automatically saves your content,
- Gets your post or page 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.
This step-by-step tutorial explains how to use the WordPress autosave and post revision function to restore content in your posts and pages.
- Using WP Autosave & Post Revisions: Step-By-Step Tutorial
- WordPress Revisions – Plugins & Additional Info
Using WP Autosave & Post Revisions: Step-By-Step Tutorial
Generally, after updating a post or page, a confirmation message like the example shown below will display …
(Edit Post – Post updated successfully!)
WordPress autosave and post revisions ensure that your content is saved at regular intervals, allowing you to undo changes to your drafts and revert back to earlier post revisions when the unlikely were to happen, for instance:
- Your internet connection goes down,
- Your browser freezes up,
- A power outage occurs,
- Internet “gremlins” temporarily prevent you from saving or publishing a post, etc.
When you try to save your work, you may end up seeing a message like this instead …
(Failure Notice – WordPress)
When you get a message that says “Are you sure you want to do this? Please try again” and click on ‘Please try again’, you will normally return to a page/post edit screen displaying an older version of your post, minus any changes that you recently made.
This is where ’autosave’ can be really useful.
The Autosave Feature Of WordPress
Autosaves are stored as a special kind of revision in the WordPress database so they won’t overwrite the post or page you’re 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.
We strongly recommend performing a complete backup of your website before making any changes to your blog or website.
If you don’t feel comfortable editing files inside your web server, feel free to contact us. We’ll be glad to help you.
If you were working for a while and something happens (e.g. your internet connection goes down temporarily), you may see a warning like the one shown below when you go back to editing your post …
Click on ‘View the autosave’ …
You will be taken to a page where an autosaved version of your post can be restored …
(Compare Revisions page)
Click ‘Restore This Autosave’ …
(WordPress offers one-click post recovery of autosaved content)
The content you were previously editing will be recovered using autosave …
(Post content restored with Autosave)
WordPress Post/Page Autosave – Additional Info
Content Recovery – Session Expired
Sometimes, a ‘Session expired’ notification will pop-up …
(WordPress – session expired notice)
If your login session expires, WordPress remembers where you were. Login again and pick up 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 working on is different from the version displayed 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 on ‘Restore the backup’ …
(Edit Post – Restore post backup)
WordPress recovers your content from the browser backup. You can also undo this operation by clicking ‘Undo’ …
(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 …
(WordPress can help you 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)
Post Revisions Feature – What Is It?
The Post Revisions feature was introduced in WordPress version 2.6. Whenever a page or post is saved, it automatically creates a revision of that post and stores it in your WordPress database.
Significant improvements were made to the WordPress post revision management function interface after WordPress version 3.6.
The new revision system also added a new option to the Post/Page Publish box called Revisions, which automatically calculates how many revisions you have made to your page/post. Click on the ‘Browse’ link to easily access the ‘Revisions’ section …
(Publish Box – Revisions)
The Compare Revisions section appears on your screen …
(Compare Revisions interface)
Note: post revision management is the same for Posts and Pages.
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 segmented the slider will be …
(The more revisions, the longer the slider)
Revisions created by making changes to content and updating your post or page display in the revision slider highlighted in black, with the save interval, time, and date of the post/page revision …
Revisions saved automatically by WordPress appear in the revision slider marked in red, along with the save interval, time, and date of the post revision …
Comparing Revisions – Options
To navigate between post revisions, move the slider button left or right …
(Move the button to the right or left of the slider)
There are also buttons to help you navigate between revisions.
Click ‘Previous’ to browse previous post versions …
(Compare Revisions – ‘Previous’ button)
Click ‘Next’ to review more recent revisions …
(Compare Revisions – ‘Next’ button)
As well as comparing adjacent revisions, the feature lets you select and compare different revisions by selecting the ‘Compare any two revisions’ box …
(’Compare any two revisions’ check box)
Adjust the sliders independently to compare any two post versions …
(Compare 2 revisions independently)
Select the saved version you would like restored and click the ‘Restore This Revision’ button …
(‘Restore This Revision’ button)
To exit and return to the post or page you’re working on, click on the title link …
(Click on the post title to return to the editor)
You can also exit without making any changes by clicking on Return to editor …
(Revisions – return to editor)
WordPress Revisions – Plugins & Additional Info
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 typically require making modifications to code in core WordPress files. If you are worried about working with files inside your server, then contact your web host or get professional assistance.
Let’s focus, then, on some additional areas of WordPress revisions that don’t require messing around with code.
WordPress Revisions Box
As soon as you edit and save pages and posts, WordPress begins to store revisions for your content in its database. You can see these displayed in a Revisions list at the bottom of the page editor …
(Post Editor section – Viewing the post revisions box)
If you can’t see the Revisions area, click the Screen Options tab at the top of your screen …
(Post Editor – Screen Options tab)
Enable the box for ‘Revisions’ in the Boxes section …
(Post Editor: Screen Options tab – Revisions)
You should now see the Revisions list below your content. Click any link to bring up the Compare Revisions page with saved content for the selected item …
Revision Management Plugins
Having functions like autosave and revisions is no doubt very useful. If you write a lot of content, 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 manage your revisions.
(Post revisions can really add up after a while)
For example, if you have 200 posts published on your site with an average of 10 revisions each your database could be storing up to 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 various plugins that can help you control 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 revisions of your WordPress pages or posts.
"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya
Disclaimer: This site has no direct association with WordPress, Automattic, or any of the WordPress-related products mentioned or reviewed on this website. We may receive an affiliate commission of financial benefit from purchases of any products mentioned on this website. All images are the copyright of their respective owners, comply with all license terms and agreements of use to the best of our knowledge and are used solely for training and illustrative purposes.
Did you enjoy this article? Please use the share buttons below to share this tutorial with anyone thinking of starting or growing a business online.