NerdPress has adopted Optimize Database After Deleting Revisions! Read the announcement here.
This plugin is a ‘One Click’ WordPress database cleaner & optimizer, with precise revision cleanup and flexible scheduling.
You can find the settings page in the WP Admin Panel » Optimize Database -or- via the WP Admin Panel » Optimize Database icon (depends on settings)
If you want to keep revisions for a specific post/page (no matter what the other settings are), create a custom field named ‘keep_revisions’ for that post/page and give it the value ‘Y’
You can start the Optimization in the WP Admin Panel » Optimize Database.
Note: if you use the Scheduler the Optimization will run automatically!
Note: you also can click the ‘Optimize DB (1 click)’ link in the admin bar (if enabled)
You can click one of the following buttons:
‘Analyze (summary): analyzes the database and gives the count of what will be cleaned
‘Analyze (detail): analyzes the database and gives a detailed report of what will be deleted
‘Optimize (summary): actually deletes the items and gives the count of what has been deleted
‘Optimize (detail): actually deletes the items and gives a detailed report of what has been deleted
In case you cannot use WPCron, but you can edit the Unix crontab:
Create a .php file, in the root directory of your site, with:
define(‘RUN_OPTIMIZE_DATABASE’, true);
require_once(‘wp-load.php’);
?>
Then, start the .php file from your crontab!
NO WARRANTY, USE IT AT YOUR OWN RISK! MAKE BACKUPS FIRST!