Over time the database fills with data no visitor ever sees, which slows queries and inflates backups.
What accumulates
- Post revisions — a page edited 40 times stores 40 full copies
- Auto-drafts and trashed posts
- Spam and trashed comments
- Expired transients
- Orphaned postmeta from plugins you deleted
- WooCommerce session and scheduled-action tables
How to clean safely
- Back up the database first — cPanel → phpMyAdmin → select the database → Export → Go.
- Install WP-Optimize or Advanced Database Cleaner.
- Run the cleanup items one at a time rather than selecting everything at once.
- Finish with the table optimisation option to reclaim disk space.
Limit future revisions
Add this to wp-config.php to keep only the last five revisions per post:
define('WP_POST_REVISIONS', 5);
Warning
Do not delete tables manually in phpMyAdmin unless you are certain what they belong to. Removing a table a live plugin depends on will break the site.