Database cleanup
The Database group has individual toggles for each cleanup type, plus a button to run them on demand and a schedule for automatic cleanup.| Toggle | What it removes |
|---|---|
| Post Cleanup → Revisions | Post and page revisions. WordPress saves a revision on every save by default. On a long-running blog, this is the biggest single source of database bloat. |
| Post Cleanup → Auto Drafts | WordPress’s auto-saved drafts (the ones it creates if you start typing in a new post). |
| Post Cleanup → Trashed Posts | Posts you’ve moved to trash but haven’t permanently deleted. |
| Comments Cleanup → Spam Comments | Spam-flagged comments that are sitting in the spam queue. |
| Comments Cleanup → Trashed Comments | Trashed (but not deleted) comments. |
| Transients Cleanup → Expired Transients | Plugin-set transient values that have passed their TTL. |
| Transients Cleanup → All Transients | Every transient, including unexpired ones. Some plugins use long-lived transients to cache expensive computations, so wiping all transients can cause a temporary slowdown until the cache rebuilds. |
| Database Cleanup → Optimize Tables | Runs OPTIMIZE TABLE on every WordPress table. Reclaims disk space from MySQL after the deletes. |
Run cleanup now or schedule
| Option | What it does |
|---|---|
| Save Changes & Optimize | Runs every enabled cleanup type immediately. |
| Automatic cleanup | Runs the same cleanup on a schedule. Frequencies: daily, weekly, monthly. |
What you’d realistically gain
A typical WordPress install with ~500 posts and 6 months of activity:| Type | Approx rows | Approx MB |
|---|---|---|
| Post revisions | 5,000–10,000 | 30–80 MB |
| Expired transients | 1,000–5,000 | 5–25 MB |
| Trashed posts | 50–200 | 1–5 MB |
| Spam comments | varies wildly | 0–50 MB |
Heartbeat control
The WordPress Heartbeat API polls the server every 15 seconds when an admin page is open. It powers post auto-saving, “user is editing this post” locks, and a few plugin features. On busy admin sessions it’s a non-trivial CPU drain. The Heartbeat section has three independent throttles:| Setting | Default | Recommendation |
|---|---|---|
| Backend (every admin page) | 60 seconds | Reduce to 120s or disable. Saves CPU when many users have admin tabs open. |
| Post editor | 15 seconds | Keep enabled. This drives the auto-save you actually want. |
| Frontend (when a logged-in user views a public page) | 60 seconds | Disable. Most plugins don’t need it on the front end. |
MAx Cache add-on
If your server has the Apache MAx Cache module installed, an extra add-on appears under Settings → Add-Ons. Toggling it on writes Apache directives into your site’s.htaccess so cached pages are served at the Apache level, faster still than the file-cache layer AccelerateWP uses by default.
Requirements (visible if MAx Cache is available):
- AccelerateWP version 3.20.0.3-1.1-33 or higher.
- Apache MAx Cache module enabled on the server.
Settings export and import
Bottom of the AccelerateWP page:- Export settings downloads a JSON file of every toggle, exclusion list, and schedule.
- Import settings uploads a previously-exported file and restores the configuration.
- WordPress major version updates.
- Switching between PHP versions.
- Migrating to another host (settings carry across cleanly).
Common issues
The site got slower right after a database cleanup
The site got slower right after a database cleanup
Almost always All Transients wiped a long-lived cache that a plugin (popular: SEO plugins, related posts) built up over weeks. The cache rebuilds on next request, but the request that triggers the rebuild is slow. Run Expired Transients instead of All Transients.
Cleanup says it ran but database size didn't drop
Cleanup says it ran but database size didn't drop
MyISAM and InnoDB don’t return space to the OS automatically. The rows are deleted but the file size is the same. Run Optimize Tables to reclaim. On InnoDB you may need a per-database
OPTIMIZE via phpMyAdmin → Operations.Auto-save stopped working in the post editor after Heartbeat changes
Auto-save stopped working in the post editor after Heartbeat changes
You disabled the post editor scope. Re-enable it. The auto-save you actually want is in this scope, not the global one.
A scheduled cleanup didn't run
A scheduled cleanup didn't run
AccelerateWP scheduling depends on WP-Cron. If your site is low traffic and WP-Cron only fires when someone visits, schedules can be missed. Either traffic the site to fire WP-Cron, or set up a server-side cron via Cron Jobs Manager to hit
wp-cron.php reliably.
