-
Notifications
You must be signed in to change notification settings - Fork 0
Database Cleanup
Scheduled removal of rows WordPress accumulates and never removes on its own. Off by default.
| Task | Removes |
|---|---|
revisions |
Post revisions beyond the retention count |
auto_drafts |
Abandoned auto-drafts |
spam_comments |
Comments marked spam |
trashed_posts |
Posts in the trash |
trashed_comments |
Comments in the trash |
expired_transients |
Transients past their expiry |
optimize_tables |
OPTIMIZE TABLE on the plugin's own and core tables |
Each is individually switchable. Retain revisions defaults to 5 — the last five per post are kept.
daily, weekly (default) or monthly. Changing it reschedules the event; disabling clears it.
wp gt-performance databasereports what would be removed without removing it. Look at the counts before enabling anything on a site whose editorial history you care about — "revisions" can mean a lot of work on an established site.
Two related controls live under Bloat, because they prevent accumulation rather than clean it up:
- Limit revisions (default 5) caps revisions as they are created
- Autosave interval (default 60s) reduces autosave churn
Capping revisions is generally better than deleting them later.
GT Performance · GPL-2.0-or-later · Issues and pull requests welcome
Getting started
Caching
Optimization
Delivery
Operations
Reference