Advanced Database Cleaner
Freemium WordPress database cleaner with previews, keep-last-X-days rules, scheduled tasks and table tools; Premium adds orphan detection.
Free, settings-free database sweeper by Lester Chan that removes revisions, orphaned meta and junk using WordPress's own delete functions, with WP-CLI.
WP-Sweep is a free database cleanup plugin by Lester Chan, the developer behind WP-PostViews and WP-PageNavi. It adds a single screen under Tools that lists each type of leftover data with a count and its share of the relevant table, and you choose which sweeps to run. There is no paid version and no settings page.
The plugin’s selling point is caution: wherever possible it deletes data through WordPress’s own functions, such as wp_delete_post_revision() or delete_transient(), rather than running raw SQL. That means hooks registered by other plugins still fire, so related caches and data stay consistent. Only orphaned meta attached to object ID 0 is removed directly.
Sweeps cover revisions, auto-drafts, trashed posts, unapproved, spam and trashed comments, orphaned and duplicated post, comment, user and term meta, orphaned term relationships, unused terms, transients, oEmbed caches and a table optimise pass limited to the site’s own prefix. A Details view shows a sample of up to 500 items a sweep would remove before you commit.
WP-Sweep is aimed squarely at people comfortable with code. Every sweep can run from WP-CLI (wp sweep –all or by name) and through authenticated REST routes, and filters let you whitelist meta keys, terms or taxonomies that other plugins store in unusual ways. The readme names several plugins, including WPML, Polylang, Elementor Popup Builder and Slider Revolution, whose data needs protecting before sweeping.
Who should pick it: developers and maintainers who want a lightweight, hook-friendly cleaner they can script from the command line, rather than a full database management suite.
Best for: Developers who want a safe, scriptable free cleaner they can run via WP-CLI.
WP-Sweep does a narrow job carefully: it cleans the usual leftovers through WordPress's own APIs and exposes everything to WP-CLI and REST. It lacks scheduling, age rules and table tools, so non-technical users wanting automation are better served elsewhere.
What WP-Sweep highlights on its WordPress.org page and its own website, split by version.
11 of 22 features we track in Database Optimization, feature score 44/100
Delete old post and page revisions.
Revision sweep deletes all revisions using wp_delete_post_revision().
Remove auto-drafts and emptied trash.
Separate sweeps for auto-drafts and trashed (deleted) posts.
Delete spam, trashed and unapproved comments.
Sweeps unapproved, spam and trashed comments.
Remove expired (or all) transients.
Transient sweep clears transient options via delete_transient() and delete_site_transient().
Remove post, comment, user and term meta with no parent.
Removes orphaned and duplicated post, comment, user and term meta plus orphaned term relationships.
Find and delete tables left behind by removed plugins.
Does not detect or remove tables left by uninstalled plugins.
Find options and scheduled tasks left by removed plugins.
No detection of leftover options or cron events from removed plugins.
Clean WooCommerce Action Scheduler completed actions and logs.
No Action Scheduler cleanup sweep.
Run OPTIMIZE TABLE to reclaim space and defragment tables.
Optimise sweep runs OPTIMIZE TABLE on tables with this install's prefix.
Repair corrupted or crashed tables.
No repair function among the sweeps.
See the size of autoloaded options and switch heavy ones off.
No autoload reporting or toggles.
Convert MyISAM tables to InnoDB.
No storage-engine conversion.
Cap how many revisions WordPress keeps from now on.
No setting to cap future revisions.
Run cleanups automatically on a schedule.
Schedules no events; sweeps run manually, via WP-CLI or REST (which you could cron yourself).
Shows counts or the exact items before anything is removed.
Shows counts and a Details sample (up to 500 items by default) of what each sweep removes.
Keep the last X days or revisions when cleaning.
No option to keep recent revisions or items newer than X days.
Built-in or integrated backup before running a cleanup.
No backup; the readme says sweeps are irreversible and advises backing up first.
Exclude specific tables, options or items from cleanup.
Code filters whitelist meta keys, term IDs and taxonomies; no admin UI for exclusions.
Shows table sizes and how much space a cleanup will save.
Shows item counts and their percentage of each table, not sizes in bytes.
Shows which plugin or theme created each table or option.
Does not identify which plugin created tables or options.
Clean and optimise across a multisite network.
Runs per site; uninstall cleans the whole network but no network-wide sweep is documented.
Run cleanups from the command line.
wp sweep command runs all sweeps or named ones.
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.
5,756 downloads last week, 2.3M all time
| Version | 2.0.1 |
|---|---|
| Last updated | 24 Aug 2026 (71 days ago) |
| Tested up to | WordPress 7.1.4 |
| Requires | WordPress 6.8+, PHP 8.2+ |
| Support threads (2 months) | 1 of 1 resolved |
| On WordPress.org since | 25 Feb 2015 |
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.
Free one-click database optimiser that deletes revisions (keeping the newest if you like), trash, spam and transients, with scheduling and multisite support.
Premium all-in-one caching and performance plugin for WordPress that applies page caching, file optimisation and lazy loading as soon as it is…
Yes. WP-Sweep has a free version on WordPress.org.
WordPress.org reports 100K+ active installations of the free version.
Yes: included. Revision sweep deletes all revisions using wp_delete_post_revision().
Yes: included. Transient sweep clears transient options via delete_transient() and delete_site_transient().
Yes: included. Removes orphaned and duplicated post, comment, user and term meta plus orphaned term relationships.
No: not included. Does not detect or remove tables left by uninstalled plugins.
Yes: included. Optimise sweep runs OPTIMIZE TABLE on tables with this install's prefix.
No: not included. No autoload reporting or toggles.
No: not included. Schedules no events; sweeps run manually, via WP-CLI or REST (which you could cron yourself).
Yes. It is a free plugin on WordPress.org with no premium version, no settings page and no upsells.
Not on its own; it schedules no events. You can automate it by calling the WP-CLI command (for example wp sweep --all) from a server cron job.
The readme lists several plugins, including WPML, Polylang and Elementor Popup Builder, whose data can look orphaned. Protect their meta keys or taxonomies with the provided whitelist filters and back up first, because sweeps cannot be undone.
2.0 raised requirements to WordPress 6.8 and PHP 8.2, renamed classes, moved the admin screen URL, removed the Sweep All button in favour of a bulk action, and limited table optimisation to the site's own prefix.
Last updated 11 Oct 2026. Spotted something wrong? Suggest an edit.