One feature you might want to turn off is WordPress post revisions. You might not even know that it’s there. Did you know that every time you make an update to a post or a page in WordPress 2.6+ a “revision” is saved? If you’ve updated the page 100 times, WordPress actually has the last 100 versions stored in your database. Multiply that times all the posts and pages in your web site, and your database could be the morbidly obese! In addition the WordPress “autosave”feature saves a version of your posts while you work, and if you take an hour to write a post a half dozen versions could be “autosaved” during that time.

The table in your database that holds posts is “wp_posts”. If you log into phpMyAdmin to look at your database and click on the “wp_posts” table check how many records you have. For instance, the intial page that pops up when you click on wp_posts usually shows 30 posts. At bottom right it was “page number” – click the dropdown and and see how many pages you have, and times that by 30 (records per page). I had 690 records. My blog has only 201 posts and 26 pages, so I have more than 3 times as many records than I need because of the additional “revisions” that I’ve saved. If you make updates to your posts and pages – you could have many more than that.

Many people feel that “post revisions” should be an optional feature of WordPress – and in fact it is, but by default it’s turned on. If you don’t want to use that feature (and bloat up your database) it’s up to you to turn it off.

You’ll probably kick yourself when you find out how easy this is. I’m going to show you how to turn off post revisions AND change your autosave settings at the same time. Just add the following lines to your ‘wp-config.php’ file:



define(’WP_POST_REVISIONS’, false);
define(’AUTOSAVE_INTERVAL’, 300);

The first line of course turns post revisions off with the false statement, and the second line changes the autosave settings to 300 (seconds), or 5 minutes. I you don’t want to use autosave – then just set it to something really high like 7200 seconds (2 hours).

Oh – if you’re database savvy and know how to run a query in MySQL, you can easily delete all the revisions you’ve stacked up so far by running the following one line of code in phpMyAdmin:



DELETE FROM wp_posts WHERE post_type = “revision”;

If you don’t like mucking around with code, then just install the Delete Revision wordpress plugin, and you can delete your old revisions manually using that!