WordPress Database Performance Triage Checklist
A WordPress site can be slow even when Nginx and PHP-FPM are running. Sometimes the real bottleneck is the database: slow queries, oversized tables, plugin logs, post revisions, transients or weak VPS resources.
Core principle
If dynamic pages are slow but static assets load quickly, the bottleneck may be PHP or database. Database triage helps you separate server availability from query performance.
Checklist
- Check whether only dynamic pages are slow.
- Check database service status.
- Check CPU and RAM usage.
- Check database size.
- Identify unusually large tables.
- Look for plugin tables that store logs or statistics.
- Check whether imports, backups or cron jobs are running.
- Review slow query logs if enabled.
- Clean safely only after backup.
- Monitor performance after cleanup or optimization.
Reusable lesson
Not every slow site needs more cache. Sometimes it needs database cleanup, better plugin discipline or more server resources.
When to Use This Checklist
Use this checklist when WordPress is slow, admin pages lag or database-related operations take too long.
Required Tools
SSH access, MySQL or MariaDB access, WordPress admin, backup, database tool, server monitoring
Before You Start
Back up the database before cleaning tables, deleting plugin data or running optimization commands.
Structured Checklist Steps
- Check static versus dynamic speed.
- Check database status.
- Check CPU and RAM.
- Check database size.
- Find large tables.
- Review plugin log tables.
- Check cron jobs.
- Review slow queries if available.
- Clean only after backup.
- Monitor performance.
Verification Steps
- Database service is stable.
- Large tables are identified.
- Backup exists.
- Admin performance improves.
- No important data is removed accidentally.
Rollback Plan
If database cleanup breaks site behavior, restore the database backup and repeat analysis on a staging copy.
Common Mistakes
- Deleting tables without knowing plugin ownership.
- No database backup.
- Blaming Nginx for database slowness.
- Using cleanup plugins blindly.
- Ignoring cron and import jobs.
Related Commands
sudo systemctl status mysql
mysql -u db_user -p
SHOW DATABASES;
SELECT table_name, ROUND((data_length+index_length)/1024/1024,2) AS size_mb FROM information_schema.tables WHERE table_schema='database_name' ORDER BY size_mb DESC LIMIT 20;
free -h
top