
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.
Next / Part 2: How To Mass Replace Text In WordPress Post Or Article Content
![]() |
Similar Wiki Articles:
Wordpress Cloud Tags:
- deleting wordpress inheritance
- how to deactivate wordpress wp_posts by script
- is it necessary to delete revisions in wordpress



{ 6 comments… read them below or add one }
Can`t for the life of me get DELETE FROM wp_posts WHERE post_type = “revision”; to work.
delete from wp_posts where post_type=’inherit’
thank you, that “feature” was indeed very irritating, glad i got rid of it.
nice share…hope you can keep sharing
i never do it before..
thanks one again
Ty alot for the tips. Can safely delete post_type ‘revision’ as well as ‘inherit’. Both these two are irrelevant plus annoying. Hopefully WP staff will fix their appearance soon enough. Can’t wait for WP 3.1, hopefully it’ll kick n flip on script!
@Danny Cheers, worked a charm.
@Neil Duckett Make sure you’re not copying & pasting the sql query from the post above as you will include the incorrect “quotation marks”. Note the difference between:
DELETE FROM wp_posts WHERE post_type = “revision”;
and
DELETE FROM wp_posts WHERE post_type = “revision”;
The latter is the correct query.
DELETE FROM wp_posts WHERE post_status = “inherit”