Delete and Remove Existing Saved Wordpress Post Revisions

One of the new feature in Wordpress 2.6 and above that irritates me is the post revision. Not only does Wordpress create and stores all the past revision automatically every 10 minutes or so, it causes your server MySQL database to be bloated with unwanted data. Within a few months, your ‘wp_posts’ table will be filled up, clustered, and the post ID will be gigantic. Worst case scenario when you backup your MySQL is to have a 50MB database, too big for uploading in case of server failure.
If you do not need this feature you can easily turn it off by adding one line to your wp-config.php file, found in the installation directory of your WordPress site:
- define(’WP_POST_REVISIONS’, false);
Adding this line to your wp-config.php file does not delete your previous saved post revisions, to remove previous post revision permanently, run this query using the WP-DBManager plugin.
- DELETE FROM wp_posts WHERE post_type = “revision”;
This will get the job done in no time and your database in good shape. Please note that extra precaution is to be taken when amending your database, make sure you keep a good backup copy before proceeding with the amendments.
Related Articles:
Similar posts you may be interested in based on past browsing
