Have you ever been in this situation? After investing much time and effort editing a blog post, something goes wrong and you suddenly find that you have lost all of your hard work because you forgot to save it?
If this happens and your website or blog is built using WordPress, then worry not! WordPress comes with a built-in autosave and content revision management function that:
- Helps you prevent losing your work if you forget to save,
- Gets your page or post back if your browser crashes while you’re working, and,
- Lets you restore 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 autosave and revision management system of WordPress to automatically recover your pages and posts while working on your content.
Revisions & Autosave Feature Of WordPress: Tutorial
Usually, whenever you update a page or post, a message like this will display …
(Post updated notice)
Like most things, however, things can go wrong. For example:
- Your modem is suddenly disconnected,
- Your browser freezes up and crashes,
- You experience a power outage,
- Internet “gremlins” 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 …
(WordPress Post Save Error Notice)
If you see a message that says Are you sure you want to do this? Please try again displayed and click on the ‘Please try again’ link, you will normally return to a screen displaying an older version of your post, minus any recent changes.
This is where WordPress ‘autosave’ really comes in handy.
In WordPress, autosave automatically enabled for all pages and posts, but this does not overwrite any published content.
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.
Always make a complete backup of your site files and database before updating any files in your blog or website.
If you feel nervous about editing code, then get in touch for help.
If you have been working for a while and something happens (e.g. your wi-fi connection goes down temporarily), a warning like the one shown below may come up when you go back to your post …
Click on the ‘View the autosave’ link …
(Click link to view the autosave)
You will be taken to a revision page where a previously saved version of your post can be restored …
(Compare Revisions section)
WordPress offers one-click post recovery of autosaved content. Click Restore This Autosave …
(WordPress offers one-click content recovery)
Your content will be restored using autosave …
(Autosave restores the content of your latest post revision)
Autosave – Additional Information
Content Recovery – Session Expired
Sometimes, your login session will simply expire …
(WordPress – session expired notice)
If you get logged out, WordPress remembers where you were, so if you login again, you can continue working from 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 content editor and gives you the opportunity to restore the autosaved backup.
(Edit Post – Restore post from browser backup)
Click on ‘Restore the backup’ …
(’The backup of this post in your browser is different from the version below. Restore the backup.’ notice)
Your content will be recovered 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)
The Post Revisions feature was introduced in WordPress 2.6. Whenever a WordPress page or post is saved, a revision of that post is automatically created and stored in the WP database.
After v. 3.6, WordPress made significant enhancements to its post revision control system interface.
The new WordPress revision system also added new settings in the Page/Post Publish box called Revisions, which automatically calculates how many revisions you have made to your content. and lets you bring up the ‘Revisions’ screen by clicking the ‘Browse’ link …
(WordPress automatically keeps a record of all changes made)
The Compare Revisions feature comes up …
(Compare Revisions screen)
Note: This function is the same for 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, the longer your slider will be …
(The more revisions you have saved, the more revision markers you will see displayed in the slider)
When you edit content and update your page or post, your revisions show up in the slider in black, along with the save interval, time, and date of the revision …
Revisions saved automatically by WordPress display in the revision slider marked in red, with the save interval, time, and date of the revision …
(Autosave revision slider)
WordPress Revision Control – Navigation Options
You can navigate between different revisions by moving the slider button left (older) or right (newer) …
(Move the button to the right or left of the revision slider)
There are also buttons to help you navigate through different revisions.
Click ‘Previous’ to review previous versions …
(Click ‘Previous’ to view older post revisions)
Click ‘Next’ to scroll through later versions …
(Click ‘Next’ to browse newer post revisions)
You can also compare revisions by checking ‘Compare any two revisions’ …
(’Compare any two revisions’ checkbox)
This lets you adjust two sliders to compare any two saved revisions …
(Compare 2 revisions)
When you find the version you want to restore, click Restore This Revision …
(‘Restore This Revision’ button)
To cancel the operation and go back to the current version of your post or page, click the title link …
(Click on the title link to return)
You can also exit without making any changes by clicking on Return to editor …
(Compare Revisions – return to editor)
WordPress Post Revisions – Plugins And Additional Information
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 WordPress files. If you feel nervous about editing code, 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 messing around with code.
The Post Revisions List – Post Editor Screen
As soon as you create, edit, and update a page or post, WordPress begins to store new revisions for the content in its database. These show up in a Revisions section below the post editor …
(Post Editor screen – View the WordPress post revisions list)
If you can’t see the Revisions area, click on the Screen Options tab in the top right-hand corner of your screen …
(Post Editor – Screen Options tab)
Select the box next to ‘Revisions’ in the Boxes section …
(Post Editor: Screen Options tab – Revisions)
You should now see the Revisions list displayed under your content editor. Clicking a link will bring up the Revisions panel …
Revision Management Plugins
Having autosave and revisions is a timesaver. If you write or edit extensively, 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.
(Your database could be storing lots of unnecessary data)
For example, if there are 300 posts on your site and each post has 20 revisions your database could be storing around 6,000 copies of unnecessary data. If your post averages 100KB data, then with 6,000 revisions, the total database space wasted is about 600MB.
Fortunately, there are a number of free WordPress plugins available to help you 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 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