I don't want to carry revisions of posts in my database. It adds to backup time and as I hit save frequently when I write it means I end up with a database that is mostly revisions.
What's the best way of cleaning this up?
I'm using WP 2.6.3
I don't want to carry revisions of posts in my database. It adds to backup time and as I hit save frequently when I write it means I end up with a database that is mostly revisions.
What's the best way of cleaning this up?
I'm using WP 2.6.3
There is a Revision Control plugin which gives you some control over revision retention.
http://dd32.id.au/wordpress-plugins/revision-control/
Very cool, stvwlf. Thanks.
You can also just add this to your wp-config.php file:
// To turn off revisions and extend autosave to one hour interval.
define ('WP_POST_REVISIONS', 0);
define('AUTOSAVE_INTERVAL', 600); // One hour should be long enough!
Change '0' to however many revisions you want to save.
http://www.lancelhoff.com/2008/08/15/how-to-disable-or-turn-off-wordpress-post-revisions/
You can add this line to your config.php to turn off revisions completely
define('WP_POST_REVISIONS', false);
I did this because I was constantly updating revisions, too, and they were eating away at my database.
I still had the problem of all those extra revisions left in my database, though. I ran this in phpMyAdmin to get delete all the revisions:
DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision'
This seems to only prevent WP from displaying the post revisions. When I go into the database the revision is still posted as a new entry.
Greg
This topic has been closed to new replies.