WordPress revision history is a handy feature for anyone publishing content. contents regularly. As a writer, it is easy to make mistakes when writing an article, even if you are a seasoned writer. At times, you may have even deleted part of your WordPress post and wished you could get it back. However, thanks to WordPress revisions, your changes are not lost forever.

In this article we will explain to you what the WordPress Revision history function does, with what types of contents you can use it, and give you some tips to get the most out of it.

What is the WordPress version history feature?

Did you know that WordPress automatically saves any changes you make to your posts? You can undo these changes and revert to an earlier version at any time. This feature is called WordPress Revisions and has been available since WordPress 2.6.

With this feature, WordPress will store an article as a revision each time you click the button Save as a draft or on each automatic saving of the publication. The autosave feature occurs every 60 seconds as a special revision, in which case old autosavings are overwritten with new autosaved revisions.

It is worth mentioning that there is only one automatic save per user for a given message and it does not replace the contents published. The auto-save feature is especially useful in situations where your browser crashes or your power suddenly goes out. In these circumstances, when you return to edit the post, WordPress will present you with a warning that it has a backup of your post and a link to restore the backup.

How to use your WordPress review history

As you can see in the screenshot below, the revisions appear in the section Publish on the article edit screen. You can also view the revisions in the post editor by clicking Screen options and checking the box of revisions .

Wordpress review area

When you click on the link Browse , you access the Revisions screen. Here you can see the changes that have been made in each revision by dragging the slider at the top of the screen. You can also use the buttons Previous et Next , as well as compare two revisions by checking the box above. The window will show what was added, what remained unchanged, and what was deleted.

Wordpress review preview

As for what you can do with the revisions, there are only two options: restore a revision or leave the article as is. If you want to restore a particular revision, you just need to click on the button Restore this revision . Clicking on Back to publication editor you can return to your message without making any changes.

What types of content can you restore with WordPress version history?

WordPress version history is enabled for all posts and pages on your site, as well as custom post types like Portfolio and testimonials added by Jetpack.

If you are using a theme with its own set of custom publication types (list of directories, staff members, portfolio, testimonials or other types of personalized publications), revisions will not be enabled by default unless the theme author supports revisions. In this case, you can manually activate the revisions using the following line of code:

$ supports = array ('title', 'editor', 'revisions');

Usually you will find the code for custom message types in the file functions.php . Place the above line just above the line of code starting with register_post_type .

Tips for using WordPress revision history

Now that you know WordPress revision history, let’s share some Tricks to get the most out of it.

Enable or disable revisions completely

By default, the Review feature is automatically enabled on each WordPress installation. If you don't see the Reviews option in the Post Editor and you've made changes to your post, it's likely that the Reviews feature has been turned off at the configuration level.

You can activate it manually by adding the following line of code to your file wp-config.php :

define ('WP_POST_REVISIONS', true);

You can also disable revisions completely by setting the value above to false as follows:

define ('WP_POST_REVISIONS', false);

Limit the number of revisions available globally

If for some reason you want to limit the number of revisions available for each post and page, you can add the following line of code to your file wp-config.php :

define ('WP_POST_REVISIONS', 5);

This will create a maximum of five revisions per post above the autosaved version. This is useful if your host limits the size of your database. data or if you find that you don't use revisions most often.

Control revisions on one post per article

If you don't mind doing a bit of custom coding, you can control how revisions are handled by post. For this you will need to use the filter wp_revisions_to_keep .

Here's what the code looks like:

add_filter ('wp_revisions_to_keep', 'filter_function_name', 10, 2); function filter_function_name ($ num, $ post) {return $ num; }

In this code, you pass the object WP_Post which represents the article you want to target and the number of revisions to keep.

Using plugins to manage revisions

As you might have guessed, there are plenty of plugins to help you manage revisions in WordPress. You can use the following plugins to help you tidy up old revisions of your posts and enable them for custom post types. We have selected plugins that have a 5 star rating, include ongoing support, and have features that improve control over WordPress Reviews on the official plugin repository.

Optimize Database After Deleting Revisions

The plugin Optimize Database After Deleting Revisions allows you to remove unnecessary revisions and optimize your database data. Some of the main features include:

  • Remove revisions to publications, pages, and custom types of posts
  • Choose a number of recent revisions to keep
  • Delete deleted posts, pages, and comments
  • Delete spam comments and unused tags
  • Remove 'pingbacks' and 'trackbacks'
  • Optimize the database tables data
  • And more

The plugin is compatible with multiple sites and you can even configure it to work automatically.

WP Revisions Control

WP Revisions Control is a simple plugin that lets you control how many revisions WordPress will keep for each post or page. Once you have activated the plugin, navigate to Settings> Writing to specify the number of revisions to keep for each type of publication.

Better Revisions

Mammoth wordpress conversion plugin on wordpress

Better Revisions is a relatively new plugin, but it takes a bit more revisions. WordPress only saves revisions if the title, content, or snippet has changed. If you edit the post's author or change the permalink to your post, it won't create a review. This is where the Better Revisions plugin comes in handy.

He adds the following fields to the revision system:

  • The author
  • Sending date
  • Permalink
  • Publication status
  • Post a word from
  • Comment status
  • Ping status
  • Post / Parent page
  • Menu command

This plugin is useful if you are launching multi-author blogs or just want more control over the revisions of your message.

WP Revision Master

Preview files on wordpress

WP Revision Master has similar functionality to the plugins above, however, it allows you to add or limit the number of revisions for any type of custom post.

Other features include:

  • Disable revisions
  • Limit the post review for the entire site, for each post type, and for each post
  • Revisions of trash individually or in bulk
  • Active support

The plugin has a rating of 5 stars and more than 900 active installations.