WordPress – managing Post Revisions Tracking

Wordpress- managing Post Revisions tracking A very interesting feature added in WordPress blog publishing system since version 2.6 is the post revisions tracking, like in version control systems. It simply adds a Wiki-like style tracking of edits that had been made to the posts or pages. This allows bloggers and authors to view, control and moderate – knowing who and when made what changes to any post or page. It also includes the ability to compare for differences between each saved versions, or revert back to older version.

WordPress Revision Versions Differences Comparison

These post revisions are stored the WordPress database in wp_posts table, with the value of post_type set to ‘revision’. During the life of your WordPress website database may grow bigger and filled with useless data, mostly when user prefer the built-in editor and clicks often on “Save” button while writing a post or page.Contrary to general belief, the auto-save feature already existing in WordPress doesn’t create a new revision version, unless it is specifically configured. The biggest drawback in increasing the size of database is that it will surely put a lot more strains to busy web server. Thus, it will slow down post retrieval and web page serving. As a side consequence, WordPress database backups will take longer time and bigger bandwidth to be downloaded.

But hey! There is a simple solution:

For WordPress 2.6 or newer if you feel that the revision feature is not mandatory and you’re content with AutoSave feature that’s built-in in WordPress editor, you might want to remove completely the post revisions tracking and keeping feature. By following the next steps you can disable it and turn off.

In order to manage these revisions, WordPress uses a constant that can be set in wp-settings.php configuration file or using a plugin to set the mode for post revisions feature: WP_POST_REVISIONS. If you like to to turn it off and disable the automatic feature of post revisions, just modify the next line of code to wp-settings.php file. You can find it in the root or home directory of your WordPress blog.Depending on the version, it can be found on line 576:

$default_constants = array( 'WP_POST_REVISIONS' => true );

After setting it to false, WordPress does not save nor store any revisions, with the only exception of one AutoSave per post.

But be careful, you’ll still have to delete the posts in the database! The modification presented in this article only stops the table growing, it will not remove your revisions.