Disabling Post Revisions in WordPress 2.8.5

I discovered that WordPress was again saving every revision of every post, though I had disabled this feature back in March.  Click   here   for more details.  But apparently, in one or more of the many software releases since then, somehow saving these revisions became enabled once more. So I turned off this feature by adding the following lines of code to the wp-config.php file for each of my blogs:

// Disable post revisions.
define(’WP_POST_REVISIONS’, false);

I also changed line 576 in the wp-settings.php file from

$default_constants = array( ‘WP_POST_REVISIONS’ => true );

to

$default_constants = array( ‘WP_POST_REVISIONS’ => false );

Also note that the line number has changed since March from 495 to 576.

Then I deleted all the revisions that had been saved to this point from each blog database by executing the following SQL statement:

DELETE FROM wp_posts WHERE post_type = “revision”;

This query resulted in the deletion of over 900 rows from the   Tom’s Diary   blog database, 327 rows from the   Tom’s Love Quest   blog, and 40 rows from the   Tom’s Views   blog database.

I then logged out and back into each site’s admin id and verified that the revisions saved thus far no longer appear on the Edit Post screen. The deletion apparently worked.   These instructions have been verified to work with WordPress 2.8.5.

That’s all.

Tom Hesley

Related Posts

2 Responses to “Disabling Post Revisions in WordPress 2.8.5”

  1. Toms Diary - Disabling Post Revisions WordPress 2-9-2 Says:

    [...] Disabling Post Revisions in WordPress 2.8.5 [...]

  2. Toms Diary - Todays Business 2009-10-27 Says:

    [...] Disabling Post Revisions in WordPress 2.8.5 [...]

Leave a Reply

You must be logged in to post a comment.