WordPress Revision History Usage

In this post, see a guide on how WordPress revision history usage saves the latest versions of every post or page on your site

By Claudio Pires
Updated on November 9, 2022
WordPress Revision History Usage

WordPress revision will save the latest version for every post or page on your site; see in this article a guide on how to take advantage of this very useful option of usage WordPress revision history and how it can be a life.

WordPress revision history usage is a useful feature for anyone who regularly publishes content. As a writer, it’s easy to make mistakes when you’re drafting a post, even if you are a seasoned writer. At times, you might have even deleted a 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 have a guide explaining how to use WordPress’ revision history feature and what types of content you can use it with, and we’ll also give you some tips to get the most out of it.

WordPress Revision History

Did you know WordPress automatically saves all the changes you make to your posts? You can undo those changes and go back to an earlier version at any time. The name of this feature is WordPress Review and it has been available since WordPress 2.6.

Thanks to this feature, WordPress will store a post as a revision every time you click the Save as a Draft button or on each autosave of the post. So, the autosave feature happens every 60 seconds as a special revision, in which case older autosaves are replaced by new autosaved revisions.

It’s worth mentioning that there is only one autosave available per user for any given post, and it does not overwrite published content. The autosave feature is especially useful in situations when your browser crashes or your power suddenly goes out. In those circumstances, when you return to edit the post, WordPress will show you a warning that it has a backup of your post and a link to restore the backup.

How to Make of WordPress Revision History Usage

WordPress Revision shows up in the Publish section on the post-editing screen. You can also display revisions below the post editor by clicking Screen Options and ticking the box next to Revisions.

When you click the Browse link, you’ll be taken to the Revisions screen. Here, you can see the changes that were made in each revision by dragging the slider at the top of the screen. You can also use the Previous and Next buttons and compare revisions by checking the above box. So, the window will indicate what was added, what remained unchanged, and what was deleted.

In terms of what you can do with post revisions, there are only two options: restore a revision or leave the post as is. Moreover, if you want to restore a particular revision, you must click on the Restore this revision button. Clicking on Return to post editor will allow you to return to your post without making any changes.

Content Types and Revision History

WordPress Revision history is enabled for all posts and pages on your site and for custom post types such as Portfolio and Testimonials added by Jetpack.

If you’re using a theme that has its own set of custom post types (such as directory listing, staff members, portfolio, testimonials, or other custom post types), revisions will not be enabled by default unless the theme author adds support for modifications. In that case, you can enable revisions yourself manually using the following line of code:

$supports = array(‘title,’ ‘editor,’ ‘revisions’);

Usually, you’ll find the code for custom post types in the functions.php file. Place the line just above the line of code that starts with register_post_type.

Guide for Usage WordPress Revision History

Now that you know what WordPress revision history does let’s share some tips on getting the most out of it.

Enable Or Disable Revisions

By default, the Revision feature is automatically enabled on every WordPress installation. Then, if you’re not seeing the Revisions option on the post editor and you’ve made changes to your post, chances are the Revisions feature has been disabled at the configuration level.

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

define( ‘WP_POST_REVISIONS’, true );

You can also disable the revisions completely by setting the above value to false like so:

define( ‘WP_POST_REVISIONS’, false );

Limit the Number Of Available WordPress Revision Globally

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

define(‘WP_POST_REVISIONS’, 5);

This will create a maximum of five revisions per post on top of the autosaved version. Moreover, this is useful if your host limits your database size or if you don’t use the revisions all that often.

Control Revisions on a Post by Post Basis

If you don’t mind doing a bit of custom coding, you can control how revisions are handled on a per-post basis. So, for this, you’ll need to use the wp_revisions_to_keep filter.

Here’s how the code looks:

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

In this code, you’re passing the WP_Post object representing the post you want to target and the number of revisions to keep.

Manage WordPress Revision With Plugins

As you might have guessed, there are quite a few plugins to help you manage revisions in WordPress. So, you can use the following plugins to help you tidy up the old revisions of your posts and enable them for custom post types. We’ve selected 4 plugins with a 5-star rating, ongoing support, and features that improve control over WordPress Revisions on the official plugin repository.

1- Optimize Database After Deleting Revisions

The Optimize Database after Deleting Revisions plugin allows you to clean out unnecessary revisions and optimize your database. Some of the main features include:

  • Delete revisions of posts, pages, and custom post types
  • Choose a number of recent revisions to keep
  • Delete trashed posts, pages, and comments
  • Delete spam comments and unused tags
  • Remove ‘pingbacks’ and ‘trackbacks’
  • Optimize the database tables
  • And more

The plugin is compatible with multiple websites. And also you can even set it to run automatically.

2 – WP Revisions Control

WP Revisions Control is a simple plugin that allows you to control how many revisions WordPress will keep for each post or page. Once you have enabled the plugin, visit Settings > Writing to specify how many revisions to retain for each post type.

3 – PublishPress Revisions: Duplicate Posts, Submit, Approve and Schedule Content Changes

PublishPress Revisions is the ultimate tool for making content changes. Users can get a safe area to handle content updates. When the changes are ready, they can request permission to publish the update. Administrators can approve or reject changes. You can also schedule them to go live in the future.

Users can update posts using the regular WordPress editor, but their changes will not be published automatically. Instead, changes are stored in the “Revision Queue.” Changes can be approved, rejected or scheduled. PublishPress Revisions uses the familiar WordPress interface, including Gutenberg and the classic editor.

Honorable Mention: (Outdated) WordPress Revision Guide

Better Revisions

Better Revisions is a relatively new plugin that makes revisions a step further. WordPress will only store revisions if the title, the content, or the excerpt has been chang. Then if you modify the post author or change the permalink to your post, it won’t create a revision. This is where the Better Revisions plugin comes in handy.

It adds the following fields to the revision system:

  • The Author
  • Post Date
  • Permalink
  • Post Status
  • Post Password
  • Comment Status
  • Ping Status
  • Post/Page Parent
  • Menu Order

This plugin is handy if you run multi-author blogs or want more control over your post revisions.

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 custom post type.

Other features include:

  • Disable revisions
  • Limit post revision for the whole site, for each post type, and for every single post
  • Trash revisions individually or in bulk
  • Active support

Conclusion

Using WordPress revision history allows you to revert changes to your posts and pages by restoring a previous version of a post or page. If you accidentally delete a part of your post or lose your internet connection due to a power outage, it saves you from writing the entire post from scratch. With our guide on WordPress revision, you will never have to worry about losing your post changes. So we hope we have helped you!

Claudio Pires

Claudio Pires is the co-founder of Visualmodo, a renowned company in web development and design. With over 15 years of experience, Claudio has honed his skills in content creation, web development support, and senior web designer. A trilingual expert fluent in English, Portuguese, and Spanish, he brings a global perspective to his work. Beyond his professional endeavors, Claudio is an active YouTuber, sharing his insights and expertise with a broader audience. Based in Brazil, Claudio continues to push the boundaries of web design and digital content, making him a pivotal figure in the industry.