Cokama Database Cleaner
Find leftover revisions, transients and orphaned rows, then delete them in batches after a backup.
Overview
WordPress databases collect leftover data for years: post revisions, expired transients, orphaned metadata, spam comments. Some cleaners tick every box for you and run OPTIMIZE TABLE, which locks tables on shared hosting.
This WordPress database cleanup plugin scans first, shows counts, and never deletes anything until you preview it, tick the categories yourself, confirm a backup, and press Clean. The SQL download is an undo file for the rows this clean removes, not a full backup. Take a full database backup through your host or a backup plugin first. There is no custom table. Uninstall only has options to remove.
What it cleans
- Revisions beyond the last few per post (default 5), auto-drafts older than 7 days, and trashed posts older than the trash window.
- Expired transients, including site transients on a network.
- Orphaned post, comment and user meta, and leftover term relationships.
- Spam comments older than 15 days and expired oEmbed caches.
- Overhead and autoloaded options size are reported only. OPTIMIZE TABLE is not run.
- Optional weekly clean (off by default) covers only expired transients, expired oEmbed cache, and spam older than 15 days.
How to use it
- Install and activate the plugin, then open Cokama Tools → Database Cleaner.
- Take a full database backup first. Then run a scan. Nothing is ticked.
- Preview each category you want to remove. Nothing is deleted until you preview it.
- Tick those categories. Clean stays disabled until you also confirm a backup and download the SQL undo file (the rows this clean will remove, not a full backup).
- Run Clean. Results and a last-20 log stay on the Results and Settings screens.
Safe by default
Installing it changes nothing. No category is ticked. Nothing is deleted until you preview it. Clean stays disabled until you confirm a backup and download the SQL undo file. That file is not a full backup. Deleting revisions is easy to undo in theory and painful in practice if a page depended on an old copy. OPTIMIZE TABLE is not run.
Privacy
Nothing is sent off the site. The SQL download is generated on your server and streamed to you.
Where we come in
Cleaning leftover rows is the easy half. Deciding what a bloated options table is doing, raising PHP limits, and checking that a plugin is not rewriting the same transients every page load is the rest. We do that work on managed WordPress plans.
WordPress database cleanup plugin support
Screenshots
Rather spend your time on your organisation than on your website?
The plugins point out the problems. A Cokama care plan sorts them out and keeps an eye on things afterwards. One price a year covers updates, backups, security checks, speed and email, with people in Dublin you can ring when something looks wrong. You get no surprise bills and you never have to hunt for a developer.
Talk to us about a care plan