How to remove WordPress post revisions →
Posted on August 11, 2008 in Development with 0 comments.
One of the more talked about features with the release of WordPress 2.6 was post revisions. WordPress post revisions store all the modifications you make to your posts in your database allowing you to restore older versions of your posts if need be.
Now, while this feature is actually quite cool and can also be quite handy, you may not like it. The main reason why I dont like the revisions feature is because it adds a new row to your wp_posts table in your database for every single revision. On a different blog of mine, I had 3 posts and a couple pages, but over 100 entries in my databases posts table.
The WordPress developers have not made turning it off as easy as clicking a button (still holding thumbs that they do that in a future release). So for now, follow the steps below to remove WordPress revisions.
Step 1
Open your wp-config.php file and add the following lines of code to it (anywhere in the file will do fine).
// Turn off WordPress Post Revisions
define('WP_POST_REVISIONS', false);
Step 2
Save and upload wp-config.
There we go. WordPress post revisions will now be turned off. If you have been posting with them on and have a database full of revisions, you can get rid of them. Lester Chan outlines a nice and easy way to remove the old revisions from your database.
Tagged with WordPress







