Disabling and/or deleting post revisions in WordPress can be extremely useful, especially if you just leave half-written posts sitting while you’re off doing something else, or if you write a LOT of posts, having all those extra revisions can begin to take up quite a bit of extra space in the database. (To somewhat see how this can affect your site, see: Speeding Your Site and Reducing CPU Usage)

To delete all the old revisions, just pop the following code into PHPMyAdmin. (Make sure to back up your database first!)

DELETE FROM wp_posts WHERE post_type = "revision";

Putting in SQL code to delete Post Revisions from WordPress

Select your database, then click the SQL Tab and paste the text into the field, then click “Go”

To completely disable WordPress post revisions, add the following to your wp-config.php file:

/* disable post-revisions */ define('WP_POST_REVISIONS', FALSE);

Make sure you add it before the line which says:

/* That's all, stop editing! Happy blogging. */

These two things will help speed up your site, and clear up space in your database. Even if you don’t decide to disable post revisions, coming back and clearing out old post revisions once in a while can be useful.

Be Sociable, Share!