Overview #
Most WordPress databases sit comfortably under 100 MB. When a database passes 250 MB, bloat starts affecting performance: slower queries, slower backups, slower admin. Above 500 MB on a normal site there is almost always a specific cause (runaway logs, oversized revisions, a data-hungry plugin), not just day-to-day growth.
The Alert #
DB_BLOAT (warning): database size exceeded 250 MB, the recommended threshold for a normal site.
| Size | Status | Meaning |
|---|---|---|
| Under 100 MB | Healthy | Normal for most sites |
| 100-250 MB | Watch | Growth worth tracking |
| 250-500 MB | Bloat | Cleanup recommended: alert triggers here |
| 500 MB+ | Severe | Almost always a specific cause: investigate |
Exception: sites with years of transactional data (WooCommerce stores, LMS with large enrolments) can legitimately run heavier. The threshold is judged against your site’s normal baseline, not in isolation.
What Causes Bloat #
| Source | What it is |
|---|---|
| Post revisions | Every edit of a post/page stored as a full copy |
| Transients | Expired cached data left behind |
| Autoloaded options | Settings loaded on every request: too many = slow |
| Orphaned metadata | Rows left by deleted posts, users, or plugins |
| Log tables | Plugins that write activity/error logs into the DB |
Finding the Weight #
- Site Health (Tools → Site Health) shows database size and autoloaded options
- WP-CLI:
wp db sizefor totals;wp evalqueries for the biggest tables (wp_options,wp_postmetaare usual suspects) - phpMyAdmin / GridPane DB tools: sort tables by size
Cleaning Safely #
- Revisions: cap them:
define('WP_POST_REVISIONS', 5);in wp-config.php for future edits; prune existing excess revisions with a cleanup tool or WP-CLI. - Transients: expired transients can be deleted safely; WP-CLI:
wp transient delete --all(use with care) or a maintenance plugin’s scheduled cleanup. - Autoloaded options: audit and remove orphaned ones; many belong to deleted plugins.
- Orphaned metadata: rows referencing deleted posts/users; cleanup plugins handle this.
- Log tables: configure log retention or stop logging to the DB.
What You Should Do #
Nothing: we handle cleanup on managed sites. If a specific plugin generates heavy data (logs, activity tables), tell us; some plugins are bloat factories and we may recommend a lighter alternative.
The Xponent Standard #
Xponent keeps databases lean as part of managed maintenance: revision limits on new installs, scheduled transient cleanup, and bloat monitoring from 250 MB. On managed sites we perform cleanup for you: safely, never destructively, with verification after.