How do I optimize the WordPress database? Print

  • 0

Optimizing removes bloat (post revisions, spam comments, transients, orphaned data) so your site runs faster.

  1. Plugin method: install WP-Optimize or Advanced Database Cleaner, then run a cleanup and optimize tables. Set it to keep only a few recent revisions.
  2. phpMyAdmin method: in cPanel open phpMyAdmin, select your database, tick all tables, and choose Optimize table from the dropdown.

Always back up your database before cleaning. You can also limit future bloat by adding define('WP_POST_REVISIONS', 3); to wp-config.php and emptying spam and trash regularly. On Toshost's LiteSpeed servers, pairing a lean database with LiteSpeed Cache gives the best performance. Need help? Open a ticket.


Was this answer helpful?

« Back