What this problem is
The wp_posts table is very large, affecting performance and backups.
Why it happens
- Many revisions and autosaves
- Large WooCommerce/order history, or page builder templates
- Plugin-generated custom post types accumulate
Prerequisites
- Database backup
- phpMyAdmin access or maintenance tooling
Diagnosis
Check how many rows are revisions, drafts, autosaves, and trash. Identify which post types dominate.
Detailed steps
Step 1) Clean revisions and autosaves
Use a trusted cleanup plugin or careful SQL (advanced) after backup.
Step 2) Empty trash and remove unneeded drafts
In wp-admin: clean trash items (posts, pages, products if applicable).
Step 3) Review plugin data
Some builders create many templates. Remove unused templates and disable features you do not use.
Step 4) Optimize tables
Run Optimize table after cleanup.
Expected results
- Smaller wp_posts and improved query performance
What to do if it fails
- Restore from backup if essential content was removed
Best practices
- Limit revisions and implement retention for logs and transient content