Skip to main content

Database

Dotjuice → Page speed → Database

What this tab controls

One-click and scheduled cleanup of database bloat: old post revisions, abandoned drafts, spam comments, expired cache entries, orphaned metadata, and full table optimisation.

Manual cleanup

Each card shows a live count for its category. Click Clean on any card to run that cleanup immediately — the count updates in place once it's done, no page reload needed.

CardWhat it removes
Post RevisionsEvery saved revision of every post and page. WordPress creates a new revision each time you save a draft, and by default never removes old ones — a frequently-edited page can accumulate dozens.
Auto DraftsPosts WordPress auto-saved as blank drafts that were never actually published or intentionally saved (the "Auto Draft" entries you sometimes see if you open the editor and navigate away). Running this also sweeps up any leftover metadata from posts already deleted elsewhere.
Spam CommentsComments already marked as spam by your spam filter — this doesn't touch legitimate comments, only ones already flagged.
TransientsExpired cached data that plugins temporarily store in your database (API responses, computed values, etc.) and were supposed to clean up themselves once expired, but often don't. Only expired entries are removed — anything still active and in use is left alone.
Orphan Post MetaMetadata rows left behind after their parent post was deleted through some other means, with nothing left to clean them up.
Optimise TablesRuns a table optimisation pass across your database, reclaiming space left behind by all the deletions above and rebuilding indexes for faster queries. Worth running after a large cleanup, or periodically as routine maintenance.

Scheduled cleanup

SettingDefaultWhat it does
Enable Scheduled Database CleanupOffTurns on automatic cleanup running in the background on the schedule you choose below.
Remove Post Revisions / Auto Drafts / Spam Comments / Expired TransientsAll offChoose which categories the scheduled cleanup handles automatically. Each is independent — enable only the ones you want running unattended.
Cleanup FrequencyWeeklyHow often the scheduled cleanup runs: Daily, Weekly, or Monthly.

Note that scheduled cleanup only covers the four categories above — Orphan Post Meta and Optimise Tables are manual-only actions, run them from the cards above whenever you'd like.

For most sites, weekly scheduled cleanup of revisions, drafts, and spam is a safe "set and forget" choice. Transients change more often and are generally safe to include too. Table optimisation is worth running manually every month or two, or right after your first big cleanup on a site that's accumulated years of bloat.