Advanced Database Cleaner
Freemium WordPress database cleaner with previews, keep-last-X-days rules, scheduled tasks and table tools; Premium adds orphan detection.
Free one-click database optimiser that deletes revisions (keeping the newest if you like), trash, spam and transients, with scheduling and multisite support.
Optimize Database after Deleting Revisions is a long-running free plugin originally written by Rolf van Gelder of CAGE Web Design and adopted by the WordPress support company NerdPress in 2024. As the name suggests, it started as a revision cleaner that optimises tables afterwards, and it has grown into a simple all-in-one cleanup routine you configure once and then run with one click or on a schedule.
On the settings screen you tick what should be removed: revisions for posts, pages or custom post types, trashed posts and comments, spam comments, unused tags, expired or all transients, pingbacks and trackbacks, the oEmbed cache and orphaned post meta. Revision cleanup can keep a chosen number of recent revisions per item or only remove revisions older than a set number of days, and a keep_revisions custom field protects individual posts. After cleaning, the plugin runs table optimisation, with options to exclude specific tables and to include InnoDB tables, which are skipped by default.
An Analyze button reports what would be removed before you commit, and an optional log records each run with savings and can be exported to CSV. You can launch it from Tools, an admin bar link or an admin menu icon, schedule it hourly, twice daily, daily or weekly, or trigger it from a Unix crontab where WP-Cron is unreliable. On multisite it is network-activated and one run optimises every site.
Who should pick it: bloggers and small sites that mainly want revisions and trash kept under control automatically, with minimal setup and no cost.
Best for: Small sites and blogs that want revisions and trash trimmed automatically with almost no setup.
This plugin does the basics well: it trims revisions while keeping recent ones, clears trash, spam and transients, and optimises tables on a schedule across a whole network. It does not dig into plugin leftovers or autoload bloat, so larger or WooCommerce sites will outgrow it.
What Optimize Database after Deleting Revisions highlights on its WordPress.org page and its own website, split by version.
13 of 22 features we track in Database Optimization, feature score 53/100
Delete old post and page revisions.
Deletes revisions of posts, pages and/or custom post types.
Remove auto-drafts and emptied trash.
Deletes trashed posts and pages; auto-drafts are removed as orphan post items.
Delete spam, trashed and unapproved comments.
Removes spam and trashed comments plus pingbacks/trackbacks, but not unapproved comments.
Remove expired (or all) transients.
Optionally deletes expired transients or all transients.
Remove post, comment, user and term meta with no parent.
Deletes orphaned post meta and orphaned term relationships only; no comment, user or term meta.
Find and delete tables left behind by removed plugins.
Does not detect tables left behind by removed plugins.
Find options and scheduled tasks left by removed plugins.
No detection of leftover options or cron events.
Clean WooCommerce Action Scheduler completed actions and logs.
No Action Scheduler cleanup.
Run OPTIMIZE TABLE to reclaim space and defragment tables.
Optimises tables after cleanup; InnoDB tables included only if enabled.
Repair corrupted or crashed tables.
No table repair function listed.
See the size of autoloaded options and switch heavy ones off.
No autoload reporting or switches.
Convert MyISAM tables to InnoDB.
Can optimise InnoDB tables but does not convert MyISAM to InnoDB.
Cap how many revisions WordPress keeps from now on.
Each run keeps only the newest X revisions, but it does not change WordPress's own revision limit.
Run cleanups automatically on a schedule.
Runs hourly, twice daily, daily or weekly, optionally at a set time; Unix crontab also supported.
Shows counts or the exact items before anything is removed.
Analyze buttons give a summary or detailed report of what would be cleaned.
Keep the last X days or revisions when cleaning.
Keep the newest X revisions or delete only revisions older than X days.
Built-in or integrated backup before running a cleanup.
No backup feature; the plugin advises making backups first.
Exclude specific tables, options or items from cleanup.
Exclude specific tables from optimisation and protect posts with a keep_revisions field.
Shows table sizes and how much space a cleanup will save.
Reports savings per run and in an exportable log, but no detailed table-size browser.
Shows which plugin or theme created each table or option.
Does not show which plugin created tables or options.
Clean and optimise across a multisite network.
Network-activate and one run optimises every site in the network.
Run cleanups from the command line.
No WP-CLI commands; a PHP file can be called from the Unix crontab instead.
On WordPress.org
Unlimited
Entirely free on WordPress.org; no paid version.
Prices are list prices from the vendor's site, checked 14 Oct 2026. Many vendors discount the first year.
Free installs from WordPress.org, the vendor's own claim, and our estimate of paid installs.
Active installations reported by WordPress.org.
The vendor does not publish a total.
There is no paid version.
1,195 downloads last week, 4M all time
| Version | 5.3.0 |
|---|---|
| Last updated | 21 May 2026 (166 days ago) |
| Tested up to | WordPress 7.0.8 |
| Requires | WordPress 2.8+, PHP 5.6+ |
| Support threads (2 months) | 0 of 0 resolved |
| On WordPress.org since | 23 Nov 2011 |
Freemium WordPress database cleaner with previews, keep-last-X-days rules, scheduled tasks and table tools; Premium adds orphan detection.
Free all-in-one plugin from TeamUpdraft combining page caching, image compression with WebP, database cleanup and minification.
Meow Apps' database cleaner for large sites: core cleanup, table, option and cron browsers with ownership hints, and a Pro background sweeper.
Free server-level cache and optimisation suite from LiteSpeed Technologies; full-page caching needs a LiteSpeed web server or QUIC.cloud CDN.
Premium all-in-one caching and performance plugin for WordPress that applies page caching, file optimisation and lazy loading as soon as it is…
Free, settings-free database sweeper by Lester Chan that removes revisions, orphaned meta and junk using WordPress's own delete functions, with WP-CLI.
Yes. Optimize Database after Deleting Revisions has a free version on WordPress.org.
WordPress.org reports 60K+ active installations of the free version.
Yes: included. Deletes revisions of posts, pages and/or custom post types.
Yes: included. Optionally deletes expired transients or all transients.
Yes: partial. Deletes orphaned post meta and orphaned term relationships only; no comment, user or term meta.
No: not included. Does not detect tables left behind by removed plugins.
Yes: included. Optimises tables after cleanup; InnoDB tables included only if enabled.
No: not included. No autoload reporting or switches.
Yes: included. Runs hourly, twice daily, daily or weekly, optionally at a set time; Unix crontab also supported.
Only if you want it to. You can keep a set number of the most recent revisions per post, delete only revisions older than a number of days, or protect a post entirely with a custom field named keep_revisions set to Y.
InnoDB tables are skipped by default. Enable the option to optimise InnoDB tables too, but note that the reported size can go up slightly after optimising them.
NerdPress, a WordPress support company, adopted the plugin from its original author Rolf van Gelder (CAGE Web Design) in early 2024 and has since shipped security and compatibility fixes.
Yes. It can run hourly, twice daily, daily or weekly at a chosen time (server time zone), or from a Unix crontab if WP-Cron is not available.
Last updated 11 Oct 2026. Spotted something wrong? Suggest an edit.