The revisions table in my database is at 70% capacity and growing. What should I do?

SQL query to run via phpmyadmin

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"  

That query will remove all post revisions from your wp database,, But remember always back up your database before running any direct SQL query..

you can also add a line into wp_config.php that will disable revisions (optional, i use it as i find revisions a bit of a pain)

define('WP_POST_REVISIONS', false);

Leave a Comment