WordPress databases grow quietly—post revisions, spam comments, expired transients, and orphaned meta. A bloated database slows wp-admin, increases backup sizes, and raises TTFB. Cleanup isn't glamorous; it's maintenance serious publishers schedule.
Symptoms of database bloat
- wp-admin loads slowly on decent hosting
- Backup plugins timeout or produce huge files
- Autoloaded options exceed a few megabytes
- Thousands of post revisions on long-form tutorials
Safe cleanup starting points
Always full backup before touching data. Use staging when possible.
- Delete spam and trashed comments from Comments screen
- Limit revisions via wp-config:
define('WP_POST_REVISIONS', 5); - Remove trashed posts and unused media periodically
- Clean expired transients with WP-Optimize or Advanced Database Cleaner
Audit autoloaded options
Run SQL or use plugins reporting autoload size. Plugins storing megabytes in wp_options with autoload='yes' crush every page load. Identify offending plugin and contact author or replace tool.
Plugins vs manual SQL
Reputable cleanup plugins show previews before delete. Avoid random "speed" plugins with no reviews deleting unpredictably. Manual SQL is for developers who read table relationships.
What not to delete blindly
- Active plugin options rows
- woocommerce_* tables on live stores without guidance
- user meta belonging to current accounts
Schedule maintenance
Quarterly cleanup on content blogs; monthly on high-comment sites. Pair with plugin updates and backup verification—same maintenance window.
Performance expectations
Cleanup won't fix bad hosting or twenty render-blocking scripts, but it removes a common wp-admin drag and helps backup reliability—both signals of a site AdSense reviewers trust to stay online.