Skip to Main Content

How to use the functionality of WordPress revisions

Divi: the easiest WordPress theme to use

Divi: The best WordPress theme of all time!

With over 701.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]

WordPress revision history is a handy feature for anyone who posts content regularly. As a writer, it's easy to make mistakes when writing an article, even if you are a seasoned writer. At times, you might 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'll walk you through what WordPress Revision's history feature does, what types of content you can use it with, and give you some tips on how 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 should be mentioned that there is only one autosave per user for any given post and it does not replace published content. The auto-save feature is especially useful in situations where your browser crashes or your power suddenly turns off. Under these circumstances, when you come back 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 Search by , 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.

Easily create your website with Elementor

Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]

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 the WordPress revision history, let's share some tips on how 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 auto-saved version. This is useful if your host is limiting the size of your database, 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 .

Are you looking for the best WordPress themes and plugins?

Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]

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. 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 tables in the database
  • 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

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.

Easily create your Online Store

Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [Recommended]

WP Revision Master

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.

This article features 0 comments

Leave a comment

Your email address will not be published. Required fields are marked with *

This site uses Akismet to reduce unwanted. Learn more about how your comments data is used.

Back To Top