Have you ever experienced this situation? After spending much time composing a new blog post post, something unexpected happens and you suddenly find that all of your hard work is gone because you didn’t hit the ‘Save’ button as you went along?
If this ever happens, then worry not! WordPress comes with a powerful built-in autosave and revision function that:
- Automatically saves earlier versions of your content,
- Gets your page or post content back if your web browser crashes while you’re working, and,
- Lets you recover an older version if you’ve changed the content of your article and would like to backtrack.
This step-by-step tutorial explains how to use the built-in WordPress autosave and post revision feature to recover and restore your pages and posts while working on your content.
- 1 How To Use WP Post Recovery & Autosave: Step-By-Step Tutorial
- 2 WordPress Revisions Function – Plugins
How To Use WP Post Recovery & Autosave: Step-By-Step Tutorial
Normally, after updating a page or post, a message like this will display …
(Edit Post – Post updated notice)
WordPress post revisions ensure that your content is saved periodically, allowing you to recover older revisions of your posts when something unexpected happens, for example:
- Your modem is suddenly disconnected,
- Your internet browser freezes up,
- Power outages,
When you try to save your work, you might end up seeing a message like this displayed on your screen instead …
(WordPress Post Save Error Message)
When you see the message “Are you sure you want to do this? Please try again” displayed and click on ‘Please try again’, you will normally return to a post or page editing screen displaying an older version of your post, minus any recent changes.
This is where the built-in autosave feature can really help you.
In WordPress, autosaves are automatically enabled for all posts and pages, but this does not overwrite any published content.
By default, posts are saved to your database every sixty seconds. This interval can be changed by adding code to your wp-config.php file.
We recommend performing a complete backup of your website before modifying any files on your website or blog.
If you don’t feel comfortable working with code, then contact us for assistance.
If you have been 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 that is more recent than the version below’ warning like the one shown below when you get back to editing your post …
Click on the link to view the autosave …
You will be taken to the Revisions feature where an autosaved version of your post can be restored …
(Compare Revisions section)
WordPress offers one-click restore of autosaved content. Click Restore This Autosave …
(WordPress offers one-click recovery of autosaved content)
Autosave recovers the content you were previously editing …
(Post revision recovered from Autosave)
Autosave – Additional Notes
Content Recovery – Session Expired
Sometimes, you will see a ‘Session expired’ notification …
(WordPress – session expired notice)
If you get logged out, WordPress remembers where you were. Log in again and continue working from 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 currently looking at is not the same as the version displayed in the editor and gives you the opportunity to restore your autosaved version.
(’The backup of this post in your browser is different from the version below.’ notice)
Click Restore the backup …
(’The backup of this post in your browser is different from the version below. Restore the backup.’ notice)
Your post will be recovered and restored successfully from your browser backup …
(Post recovered 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 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)
Post Revisions – What Is It?
The Post Revisions feature was introduced to WordPress in 2.6. Whenever a page or post is saved in WordPress, a revision of that post is automatically created and stored in the WP database.
Significant enhancements were made to the WordPress content revision management function interface after WP 3.6.
The new WordPress revision system also added a new option to the Publish box called Revisions, which allows you to see at a glance how many revisions you have made to your post/page.Click ’Browse’ to access the Compare Revisions section …
(WordPress automatically records your post changes)
The Compare Revisions section appears in your browser …
(Compare Revisions section)
Note: The revision control feature is available for Pages and Posts.
How To Compare Revisions – Revision Slider
A Revision Slider allows you to move through your revisions. The more revisions you have, the more segmented your slider will be …
(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/page revision …
When WordPress automatically saves your post or page, your revisions show up in the revision slider marked in red, along with the save interval, time, and date of the revision …
How To Compare Revisions – How to Use The Revision Slider
You can navigate between sequential post revisions by moving the slider to the left or right …
(Move the button to the left or right of the slider)
There are also buttons to assist with navigation.
Click ‘Previous’ to browse earlier versions …
(Compare Revisions – ‘Previous’ button)
Click ‘Next’ to review later versions …
(Compare Revisions – ‘Next’ button)
You can also compare two different revisions by ticking the ‘Compare any two revisions’ option …
(’Compare any two revisions’ check box)
Adjust the slider buttons independently to compare any two saved revisions …
(Compare any 2 post revisions)
When you find the saved version you want to restore, click Restore This Revision …
(’Restore This Revision’)
To return to the content editor without restoring any revisions, click on the post or page title link …
(Click the post title to go back)
You can also exit the Compare Revisions feature by clicking on Return to editor …
(’Return to editor’)
WordPress Revisions Function – 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 generally involve making edits to code in core installation files. If you are not confident working with code, then contact us. We’ll be glad to assist you.
Let’s focus, then, on some additional areas of WordPress revisions management that don’t require editing code.
WordPress Revisions Box
As soon as you edit and save your pages and posts, WordPress begins to store new post revisions in its database. These are displayed in a Revisions list at the bottom of the content editor …
(WordPress post revisions list)
If you can’t see the Revisions area in the Post editor screen, click on the Screen Options tab at the top of the screen …
(Screen Options tab)
Tick the box next to ‘Revisions’ in the Boxes section …
(Post Editor: Screen Options tab – Revisions)
You should now see the Revisions list under your content. Click any of the links to bring up the Compare Revisions feature …
(Post Editor Screen: Revisions Box)
Revision Management Plugins
Autosave and post revisions are no doubt functions that help create a more productive workflow. If you write and 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 be able to manage your revisions.
(Post revisions can really add up after a while)
For example, if there are 50 posts on your site and each post has 20 revisions your database could be storing an extra 1,000 copies of unnecessary data. If your post is approximately 100KB data, then with 1,000 post revisions, the total space wasted is about 100MB.
Fortunately, there are some great (and free) plugins to help you control and manage your revisions and reduce the size of your database. Here are some of these:
(Better Delete Revision – WordPress Plugin)
Better Delete Revision removes redundant revisions of posts from your database as well as database content associated with each revision such as relationships, meta data, tags, and more.
After the plugin has been installed and activated, Better Delete Revision can perform optimizations on your database.
Log into the WP administration section and select Settings > Better Delete Revision …
(Better Delete Revision – Settings)
This brings you to the Better Delete Revision Manager area. Click ’Check Revision Posts’ to calculate how many redundant post revisions you can safely remove from the WordPress database …
(Better Delete Revision Manager – Check Revision Posts)
Depending on the number of posts and revisions associated with each post, the plugin displays a list of post revisions stored in your database …
(List of revisions)
Click on the ‘Yes, I would like to delete them! …’ button to remove all list items from your WP database, or abandon the process and exit the page with your post revisions undeleted …
(Clear list of post revisions)
The redundant post revisions will be removed from the WordPress database …
(Revisions list deleted – Better Delete Revision Manager)
After a while, we recommend running the tool again to keep your WP database as light as possible, since WordPress automatically begins saving all new post revisions again (unless you have turned the feature off) …
(WordPress automatically begins saving all revisions again!)
You can also use the plugin to optimize your WP database …
(Optimize your WP database)
Better Delete Revision checks to see if your WP database tables need to be optimized and provides an easy one-click optimization routine that does not require you to log into your hosting control panel or mess with technical tools …
(Better Delete Revision lets you perform an easy one-click table optimization routine)
More info: Better Delete Revision Plugin For WordPress
(Optimize Database after Deleting Revisions)
OptimizeDatabase not only lets you remove redundant post and page revisions (with the option to keep a specific number of the most recent revisions) and checks if the database needs cleaning and optimization, it also lets you do the following optional maintenance tasks:
- Delete trashed posts, comments, and pages
- Delete spammed comments
- Delete ’pingbacks’ and ‘trackbacks’
- Exclude specific posts/pages and tables from optimization
- Create a log file of the optimizations
- And more!
(Optimize Database after Deleting Revisions – WordPress Plugin Settings)
(WP-Optimize WordPress Plugin)
In addition to removing redundant post and page revisions and checking if your database needs optimization, WP Optimize also lets you perform the following:
- Enable/Disable comments for all published posts
- Remove spam comments
- Mobile device friendly
- Remove trackbacks and pingbacks
- Clean up auto draft posts
- Ability to retain data from selected number of weeks when cleaning up
- Add or remove link on WP admin bar
- Enable/Disable weekly schedules of optimization
- Display database table statistics
- Receive email notifications after scheduled database cleanup
- Highlights dangerous cleanup operations in red
- And more!
(WP-Optimize – Settings)
Go here to learn more about this plugin: WP Optimize – WordPress Plugin
(WP-Sweep Plugin For WordPress)
WP Sweep allows you to clean up unused, orphaned, and duplicated data in your database, including post revisions. This plugin cleans up:
- Auto drafts
- Spammed comments
- Orphaned post meta
- Duplicated post meta
- Transient options
- And more!
(WP-Sweep – Settings Page)
For more information, go here: WP-Sweep – WordPress Plugin
For more plugins that can help you manage post revisions and optimize your database, go to Plugins > Add New and search for keywords like “Post Revisions“, “Optimize“, etc …
(WordPress Plugins Menu – Add Plugins)
Congratulations, now you know how to use the WordPress Revisions feature to recover older revisions of your WordPress posts and pages.
"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum
Disclaimer: This site is not associated with WordPress, Automattic, or any WordPress products mentioned on this website. We may receive financial benefits from sales of any third-party services and products advertised on our site. All images and details sourced from product websites are the copyright of their respective owners, comply with all license terms and agreements of use are used solely for training or illustrative purposes.
Did you find this post useful? Feel free to share this tutorial with others using the links below.