How to Turn Off Post Revision In WordPress Without Plugin

I noticed that if I edit a post many times, there are lots of post revisions will be created automatically as the screenshot below.

Wordpress Post Revisions

Image A-1: WordPress revision post feature
Screenshots by Terry | PCDIY.com

Since my blog opened at Mar.28, till today I only have posted 30 posts, but you can see the POST_ID for this post is 726! Because of how many times I edit a post, how many new rows will be created in wp_posts table. Hence I decide to disable the revision post feature in my blog.

There are many wordpress plugins related to post revision management can be downloaded to use, but in this case, I don’t think I need to install a plugin because that disabling this feature in WordPress is easier than installing a plugin.

Here are the steps I share with you.

Step 1: Backup your wp-config.php to wp-config-2.php ( suggested )

Step 2: Open wp-config.php and add a new line below:

1
define('WP_POST_REVISIONS', false);

Example:

14
15
16
 * @package WordPress
 */
define('WP_POST_REVISIONS', false);

This code is added to the line 16 of the wp-config.php , you can add this code to any line in wp-config.php to take effect.

Note:

Do not put this code under the line below or it will not take effect.

require_once(ABSPATH . 'wp-settings.php');

Step 3: Save and upload wp-config.php to your hosting space.

Now, You’re done. The post revisions will not be created in your blog anymore.

Do you like this article?
Related Posts
Leave a Reply

Only useful comments will be allowed.

Copyright © 2007-2012 Pcdiy How-to Blog. Some Rights Reserved. Privacy Policy