Optimising MySQL databases

Databases Updated Jan 18, 2026

Database Optimisation

Keep your databases running efficiently for better site performance.

Using phpMyAdmin

  1. Open phpMyAdmin
  2. Select your database
  3. Click Check All to select all tables
  4. From dropdown, select Optimize table
  5. Click Go

WordPress Database Cleanup

Use WP-Optimize plugin to:

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.

Was this article helpful?