Database Optimisation
Keep your databases running efficiently for better site performance.
Using phpMyAdmin
- Open phpMyAdmin
- Select your database
- Click Check All to select all tables
- From dropdown, select Optimize table
- Click Go
WordPress Database Cleanup
Use WP-Optimize plugin to:
- Remove post revisions
- Delete spam comments
- Clear transients
- Remove orphaned data
- Optimise tables
Manual Cleanup Queries
Delete Post Revisions
DELETE FROM wp_posts WHERE post_type = 'revision';
Delete Spam Comments
DELETE FROM wp_comments WHERE comment_approved = 'spam';
Clear Transients
DELETE FROM wp_options WHERE option_name LIKE '_transient_%';
Regular Maintenance
Always backup before running database queries.