Have you ever been in a situation where, after investing a great deal of time and effort editing a post, something crashes and you suddenly find that you have lost all of your hard work because you forgot to hit the ‘Save’ button as you went along?
If this happens, don’t feel dismayed! WordPress has a powerful autosave and content recovery feature that:
- Helps to prevent losing your work if you forget to save,
- Gets your post or page back if something happens to your browser or computer while you’re working, and,
- Lets you restore an earlier version if you changed the content of an article and would like to backtrack.
This tutorial explains how to use the built-in autosave and content recovery function of WordPress to automatically restore content in your posts and pages.
- 1 The WordPress Post Revisions And Autosave Feature: Step-By-Step Tutorial
- 1.1 The Autosave Feature Of WordPress
- 1.2 WordPress Autosave – Additional Info
- 1.3 What Are Post Revisions?
- 2 WordPress Post Revisions – Plugins & Additional Notes
The WordPress Post Revisions And Autosave Feature: Step-By-Step Tutorial
Normally, whenever you edit and save a page or post, you will see a message like this …
(Post updated notification)
WordPress post revisions ensure that your content is saved at regular intervals, allowing you to revert back to earlier revisions of your posts if something unexpected happens, such as:
- Your modem gets disconnected,
- Your web browser freezes up,
- A power outage occurs,
When you try to save your work, a ‘WordPress Failure Notice’ like this may end up being displayed instead …
(WordPress Post Save Error Notice)
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 screen displaying an older version of your post, minus any changes that you recently made.
This is where the built-in WordPress autosave function can really save you time.
The Autosave Feature Of WordPress
In WordPress, the autosave function is automatically enabled for all posts and pages, but this does not overwrite your published content.
By default, posts are autosaved to your database every sixty seconds. This time interval can be changed by modifying code in your wp-config.php file.
We strongly recommend performing a full backup of your site files and database before making any updates to website files.
If you are worried about editing files inside your web server, then contact us. We’ll be glad to assist you.
If you were working on your post for a while and something happens (e.g. your browser crashes), a There is an autosave of this post …’ notification like this may come up when you get back to editing your post or page …
(Edit Post – Autosave notification)
Click on the link (‘View the autosave’) …
(View the autosave)
You will be taken to a page where an autosaved version of your post can be restored …
(Revisions feature panel)
WordPress offers one-click recovery. Click Restore This Autosave …
(WordPress offers one-click restore)
Autosave restores the content of your post …
(Autosave restores your latest post revision)
WordPress Autosave – Additional Info
Content Recovery – Session Expired
Sometimes, you will get a ‘Session expired’ message …
If you get logged out, WordPress remembers where you were. This allows you to 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 displayed in the editor and gives you the opportunity to restore the autosaved backup version.
(’The backup of this post in your browser is different from the version below.’ warning)
Click on ‘Restore the backup’ …
(Restore post from browser backup)
Your content will be restored from your browser backup. You can also undo this operation by clicking the ‘Undo’ link …
(Your post is now 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 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 loss of internet connection. Source: WordPress 4.6 updates)
What Are Post Revisions?
Post Revisions are a feature that was introduced to WordPress in 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.
After WordPress 3.6, WordPress made significant enhancements to its content revision control function.
The new WordPress revision system now includes new settings in the Publish box called Revisions, which lets you immediately see how many revisions you have made.Click ’Browse’ to bring up the Compare Revisions panel …
(Publish – Revisions)
The Revisions work area comes up …
Note: This function is the same for both Posts and Pages.
How To Compare Revisions – Revision Slider
A Revision Slider allows you to move through different revisions. The more revisions you have saved, the longer your slider will be …
(The more revisions you have, the more segmented the slider will be)
When you edit content and update your page or post, your revisions display in the revision slider marked in black, with the save interval, time, and date of the revision …
Revisions saved automatically by WordPress appear in the slider in red, with the save interval, time, and date of the post revision …
(Revision slider – autosave)
To navigate between adjacent post revisions, move the revision slider right or left …
(Move the revision slider to the right or left)
There are also buttons to assist you when moving through the revisions.
Click ‘Previous’ to browse older post revisions …
(Click ‘Previous’ to browse earlier post revisions)
Click ‘Next’ to review later versions …
(Click ‘Next’ to view newer post revisions)
As well as comparing sequential post/page revisions, WordPress lets you select and compare two different revisions by enabling the ‘Compare any two revisions’ box …
(Compare any two revisions)
Adjust the buttons to compare any two post versions …
(Compare different post revisions)
Select the version you would like to restore and click Restore This Revision …
(’Restore This Revision’)
To cancel the operation and exit without making any changes, click on the title link of your page or post …
(Click the title link to return)
You can also exit by clicking Return to editor …
(Compare Revisions – return to content editor)
WordPress Post Revisions – Plugins & Additional Notes
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 involve making edits to code in core WordPress files. If working with files inside your web server makes you nervous, then get in touch. We’ll be glad to assist you.
Let’s focus, then, on some additional areas of WordPress revisions control that don’t require editing code.
Post Editor Screen – Viewing The Revisions Box
As soon as you edit and update posts and pages, WordPress begins to store new post revisions in its database. These show up in a Revisions section below your post or page …
(Post Editor screen – Viewing the WordPress post revisions list)
If you can’t see the Revisions list in the Post editor screen, click on the Screen Options tab near the top of the screen …
(Screen Options tab)
Select the checkbox next to ‘Revisions’ in the Boxes section …
(Screen Options tab – Revisions)
You should now see the Revisions list below your content editor. Click any link to bring up the Compare Revisions feature …
Revision Management Plugins
For most WordPress users, having features like autosave and automatic revisions is a timesaver. If you write or edit often, however, the number of revisions can start building up. This can significantly grow 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 you have 300 posts published on your site with an average of 10 revisions each you could be storing up to 6,000 copies of unnecessary data. If your post is approximately 100KB data, then with 6,000 revisions, the total space wasted is about 600MB.
Fortunately, there are several plugins to help you control your revisions and reduce the size of your database. Let’s take a look at a few:
(Better Delete Revision)
This plugin deletes redundant revisions of posts from your database as well as other revision-related content like tags, meta information, relationships, and more.
After the plugin has been installed and activated, you can use it to optimize your database without having to log into your server.
Go to your Dashboard and choose Settings > Better Delete Revision …
(Better Delete Revision – WP Settings Menu)
This brings you to the Better Delete Revision Manager panel. Click the ‘Check Revision Posts’ button to calculate the number of redundant post revisions you can delete from your database …
(Check Revision Posts – Better Delete Revision Manager)
Depending on the number of posts and revisions belonging to each post, the plugin will then calculate and display a table of post revisions stored in the database …
Click on the ‘Yes, I would like to delete them! …’ button below the list to delete the items from your WordPress database …
(Delete list of post revisions – Better Delete Revision Manager)
The redundant post information will be deleted from your WordPress database …
After some time has passed, therefore, we recommend running the tool again to keep your WP database as lean as possible, since WordPress will automatically begin storing your new revisions again …
(Post revisions automatically start being saved again!)
Like the other plugins described in this section, you can also use the plugin to keep your database optimized …
(Optimize the site’s database – Better Delete Revision Manager)
The plugin checks to see if the database needs to be optimized and provides an easy one-click WordPress database optimization maintenance routine that does not require you to log into your hosting control panel …
(Better Delete Revision lets you perform a one-click database optimization routine)
More info: Better Delete Revision
(Optimize Database after Deleting Revisions WP Plugin)
This plugin is similar to the one described above. It not only lets you prune unnecessary page and post revisions (with the added option to keep a specific number of your most recent revisions) and lets you perform a one-click optimization routine, it also lets you perform the following maintenance tasks:
- Delete trashed pages, posts, and comments
- Delete spammed comments
- Delete ’pingbacks’ and ‘trackbacks’
- Exclude selected posts/pages and tables from cleaning and optimization
- Automatically schedule optimizations
- And more!
(Optimize Database after Deleting Revisions – WordPress Plugin Settings Page)
Go here to learn more about using this WordPress plugin: Optimize Database after Deleting Revisions – WordPress Plugin
(WP Optimize Plugin)
In addition to performing tasks such as cleaning redundant revisions of posts and pages and checking if the database tables need to be optimized, this plugin also lets you do the following:
- Enable/Disable comments for all published posts
- Remove stale unapproved comments
- Mobile device friendly
- Remove transient options
- Clear out post trash
- Ability to retain selected number of weeks data when cleaning up
- Add or remove link on WP admin bar
- Enable/Disable weekly schedules of optimization
- View database table statistics
- E-mail notifications after scheduled database cleanups
- Highlights dangerous cleanup items in red
- And more!
(WP-Optimize Plugin For WordPress – Settings Panel)
Go here for more information: WP Optimize Plugin
(WP Sweep Plugin For WordPress)
WP Sweep allows you to clean up orphaned, unused, and duplicated data in your WP database, including post revisions. This plugin cleans up:
- Auto drafts
- Spammed comments
- Orphaned term relationships
- Duplicated comment meta
- Unused terms
- And more!
(WP-Sweep Plugin For WordPress – Settings Page)
More info: WP Sweep Plugin For WordPress
In addition to the above plugins, you can view more plugins that can help you manage post revisions and optimize your WP database, go to Plugins > Add New and type in keywords like “Manage Post Revisions“, “Optimize“, etc …
(Plugins Menu – Add New Plugins)
Congratulations, now you know how to use the WordPress Revisions feature to restore earlier saved versions of your WordPress pages or posts.
"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
Disclaimer: This site has no direct association with WordPress or any of the products promoted on this site. We may derive a financial benefit or affiliate commission from sales of services and/or products advertised on our website. All images and information sourced from product websites remain the copyright of their respective owners, comply with all license terms and agreements of use to the best of our knowledge and are being used solely for illustrative or training purposes.
Did you enjoy this tutorial? If so, please take a moment and share this page with anyone who can benefit from WordPress using the social buttons below.