What Database Bloat Looks Like
The database grows even when the content does not. Backups take longer, the hosting panel warns about database size, wp-admin gets heavier, and nobody can say which rows are safe to remove.
Most of the weight is boring: post revisions, expired temporary cache entries, old auto-drafts, trash, orphaned settings and finished background jobs. It still becomes a problem because nobody owns the cleanup until the database is already heavy.
The dangerous click is a cleanup plugin that treats every unknown row as junk. Order history, plugin settings and custom tables are data the site may still need.
Database Optimizer starts from a different position: show what is there, clean the categories WordPress can explain, write the backup first, and leave judgment calls as report-only.
What Actually Piles Up
| Kind of bloat | Why it appears |
|---|---|
| Post revisions | Every update can leave another copy of the post. Database Optimizer keeps the newest revisions per post and removes only the older ones you choose to prune. |
| Expired temporary entries | WordPress and plugins store short-lived cache entries in the database. Expired ones can be regenerated, so they are the safest cleanup category. |
| Orphaned rows | Rows left behind when a post, comment, user or term no longer exists, plus old auto-drafts and posts sitting in trash. |
| Finished background jobs | Completed, failed and canceled background-job rows pile up in WooCommerce and other queue-using plugins. |
| Custom tables | Deleting a plugin removes its files, not always the tables it created. The report shows which installed code still references each table. |
| WooCommerce order meta | Extensions can leave large key/value data on historical orders. Financial and order keys are marked protected and are never removed by this report. |
See the Weight Before You Delete Anything
The module opens with counts and byte sizes for each cleanup category. You can see how many revisions exist, how much space they occupy, which posts hoard the most, how many temporary entries expired, and how large each database table is.
- Revision preview. Choose how many revisions to keep per post - 5 is the starting value - and preview how many older rows would go before running the prune.
- Orphan preview. Orphaned metadata is grouped by key with row counts and byte totals, so you see which plugin leftover dominates instead of deleting blind.
- Custom table report. Non-core tables are listed with approximate size and owner status, but never dropped by the module.
- WooCommerce order-meta report. On WooCommerce, the largest order meta keys are ranked by size and core financial keys are marked protected. This report never deletes anything.
- Table overhead. Tables with reclaimable overhead are the only ones offered to the optimize pass; clean tables are skipped.
That preview tells you what the size means. Counts and byte sizes are grouped by cleanup category, so you can choose what to clean based on evidence.
Backup First, Delete Second
Every row-deleting cleanup in Database Optimizer writes a SQL dump of the rows first. If that file cannot be written and verified, the cleanup refuses to delete anything. An incomplete backup means no delete.
- Write the dump. The rows selected for deletion are streamed to a SQL file before the first delete runs.
- Verify the file. A failed or incomplete dump means the cleanup stops while every row is still in the database.
- Delete only what was dumped. Rows that changed during the cleanup are left in place for a later run instead of being deleted against a stale backup.
- Offer the download. The success notice links the SQL file, so the rows can be restored with a normal database import if you ever need them.
- Protect the storage. The backup location prefers a directory outside the public web root. If it must use uploads, protection files are written and public access is tested.
Backups are also sensitive, so they do not accumulate forever. Old backup files are pruned daily and after new backups; the default is 30 days while always keeping the newest 5, and both settings are configurable.
This is a row-level backup for the cleanup you just ran. It is not a full-site backup and it does not replace your normal backup system.
Database Optimizer is included with WP Multitool, and every paid plan includes all 19 modules from $79/year for one site. Preview first, back up first, then delete only what the backup covers.
Get WP Multitool - from $79/yearWhat Database Optimizer Cleans - and What It Only Reports
Expired temporary entries are the easy win. Clearing all temporary entries is offered too, but the screen warns you because active sessions and WooCommerce carts can live there. Expired-only is the sane default.
Revision pruning keeps the newest revisions per post. Orphan cleanup removes metadata whose parent record is gone, old auto-drafts older than 7 days, and posts in trash for more than 30 days. Finished background-job cleanup covers failed and completed jobs, not pending or in-progress work.
The cron card can run overdue tasks and lets you remove individually reviewed events that look abandoned. A callback missing in the current request can still be registered by code that only loads while cron runs, so events are removed one by one with a backup and can be restored.
Custom tables and WooCommerce order meta stay report-only. The module will show likely dead tables and heavy non-protected order keys. It will not drop a table or delete financial records for you. That boundary is deliberate.
What Database Optimizer Will Not Do
- It does not run a full cleanup on a schedule. Cleanup actions are explicit clicks. Automatic scheduling applies to backup retention, not to deleting your data.
- It does not decide that a custom table is dead. The report compares table names with installed plugin and theme code, then leaves manual review to you.
- It does not delete WooCommerce order meta. The order-meta report marks protected core keys and never removes anything.
- It is not a full backup solution. The SQL file covers rows selected by that cleanup, not the whole database, files or settings.
- Deleting rows does not always shrink files immediately. Table optimization can reclaim overhead, but the database storage engine may still report baseline overhead afterwards.
- Clearing all temporary entries can log people out or empty carts. Use expired-only unless you understand what the active entries contain.
- It cannot fix a slow query by itself. A smaller database helps, but a bad query plan or heavy plugin still needs Slow Query Analyzer or the profiler.
WordPress Database Cleanup FAQ
Is WordPress database cleanup safe?
It is safe only when the categories are understood and the rows are backed up first. Database Optimizer writes a SQL dump before deleting, refuses the cleanup if that dump cannot be written, and keeps report-only areas like custom tables separate.
Does it delete published posts or pages?
No. The cleanup targets older revisions, expired temporary entries, orphaned rows, old auto-drafts, posts already in trash for more than 30 days, and finished background-job rows. Published content is not a cleanup category.
Does Database Optimizer run automatically?
No full database cleanup runs on a schedule. You choose each cleanup deliberately. Backup retention itself is automatic so old SQL dumps do not pile up forever.
Is the SQL backup a full site backup?
No. It contains the rows selected for that cleanup, so they can be restored if needed. It does not replace a normal full database and file backup.
Why is my database still large after cleanup?
Deleting rows can leave empty space inside database tables. The optimize pass can reclaim table overhead where the storage engine allows it, but row count and file size are not the same measurement.
Can clearing transients empty WooCommerce carts?
Clearing expired transients is the safe path. Clearing all transients can remove active sessions because WooCommerce stores cart sessions there, and the module warns about that before you click.
Will database cleanup make WordPress faster?
It can when bloat is part of the cost: smaller tables, less overhead and fewer expired rows are easier to work with. It does not fix a slow query, missing index or heavy plugin by itself.
Clean the Database With a Way Back
Database Optimizer is included with WP Multitool, and every paid plan includes all 19 modules from $79/year for one site. Preview first, back up first, then delete only what the backup covers.
Get WP Multitool - from $79/year Autoload Bloat Guide All plans on the pricing page →