Database cleanup: remove revisions, drafts and expired data
Database cleanup (Baza Helper > Database cleanup, a Pro tool) lists only things that are safe to remove. Each one is counted and sampled first, and nothing is deleted until you press Clean and confirm.
Back up the database before the first run. The tool does not make a table backup of its own. Backup & migration in Baza Helper can do it.
What it can remove
- Old revisions: saved copies of posts and pages older than 30 days. The current content is never touched.
- Abandoned auto-drafts: empty drafts WordPress created when you opened Add new and never saved, older than 7 days.
- Spam and trashed comments: comments already marked as spam or moved to the trash.
- Expired transients: temporary cached values that have expired and only take space in the options table.
- Orphaned post meta: custom fields that belong to posts which no longer exist.
Clean safely
- Open the tab and read the counts and the samples for each category.
- Make a backup of the database.
- Press Clean on a category and confirm.
- Wait while it works through the items in batches of 200.
The tool deletes through WordPress’s own functions (wp_delete_post_revision, wp_delete_post, wp_delete_comment, the transient functions and delete_metadata_by_mid), so hooks still run. The related Diagnostics tab only reads and reports; cleaning is done here.
Last Modified: 19.10.2026
