Removing changes in mail messages and pages will significantly reduce the size of the WP database - up to 90% in some cases - with a huge return in speed.
Run as a SQL query in phpmyadmin to remove changes; if necessary, change the table prefix:
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'
Then optimize all the tables. And then add
define ('WP_POST_REVISIONS', FALSE);
at the top of wp-config.php to disable future versions.
source
share