WordPress Revisions and Auto Save Features

wordpress-revisions-iconSince WordPress 2.6 WordPress has incorporated two features designed to make editing pages and posts easier and more secure.

These features are designed to allow you to recover from connection errors and editing mistakes.

The features are called Auto save and Revisions.

The revisions and autosave should appear underneath the post/page when editing.

revision-list

If not then you need to go to screen options and check the revisions box to view them.

There is also a link in the right column in the publish window that shows the number of revisions. Click browse to view the revision list.

When you go into revisions notice the current revision in the top left. This refers to the revision being displayed in the right column if you click on restore this version is restored.

WordPress-restore-revisions-2

You can use the slider bar to move between revisions. In this mode the windows display consecutive revisions the latest revision appears in the right pane,with the one immediately before that in the left panr.

You can compare any two revisions by clicking on the compare two revisions box.

When comparing two revisions then the slider is split in two with the left one changing the revision displayed in the left pane, and the right arrow changing the revision shown in the right pane

compare-two-revisions

You should note that revisions are created when you manually save or update a page or post, and are you are allowed unlimited revisions.

Auto Saves

Auto saves are created automatically every sixty seconds while you are editing a page/page  each auto save overwrites the previous one.

Therefore you only ever have one auto save.

If you have a browser crash or loose the connection to the WordPress server or just forget to save your edits then the auto save feature can be used to restore your edits.

You cannot turn the feature off in the WordPress settings they are present and enabled by default.

Revision Control

You can modify the Autosave interval (default of 6o seconds) and turn off or limit revisions in the  wp-config.php file.

You need to place the changes above the ABSPATH directive as shown in the example code below
define('WP_DEBUG', false);
define('AUTOSAVE_INTERVAL', 300); // seconds
define('WP_POST_REVISIONS', 30); //max number of revisions allowed

/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');

Restricting the numner of revisions has no effect if the page or post already has more than the limit you set.

For example if you edit the wp_config.php and set the maximum number of revisions to 10 then if a post already has 11 revisions it will completely ignore the setting.

However if a post has only 9 revisions then it will be limited to 10.

Revision Plugins

There are two types of plugins.

Plugins like  revision control which you can use to manage revision settings. These basically replace manually editing the wp_config.php file.

Plugins line simple revisions delete that let you delete old revisions.

You can see how many revision a page/post has in the right sidebar.

wordpress-revisions-count

Most of the plugins I looked at will delete all of the revisions.

For example the simple revision delete plugin introduces a purge option next to the revisions link.

simple-revision-plugin-screen

If you purge the revisions then all revisions are deleted.

The simple Revision delete plugin will also bulk delete revisions. You need to go to all posts or all pages then select the posts/pages you want to purge and the select purge revisions from the drop down box and the apply,

bulk-delete-revisions

Video

The video below gives an overview of the Autosave and revision features. However you should note that since I made the video above the revision interface has changed and now uses a slider bar to review revisions.

Common Questions and Answers

Q- Can you manually delete a revision.

A- Yes go to the revisions window under the page or post and click on the delete link.

manually delete-revision

There doesn’t appear to be a way of manually deleting multiple revisions.

Q- Can you manually delete multiple revisions.

A- No I don’t think so

Summary

The auto save and revisions features make editing your pages and posts more secure as they allow you to easily recover from editing mistakes.

I would recommend you setting the wp_config.php file settings from the start and avoid using the plugins if possible as many of the revision control setting plugins I found were not being maintained.

When deleting revisions also do a back up first just in case.

Related articles and resources:

Did this Tutorial Help? Please Rate
[Total: 0 Average: 0]