Databases (MySQL / phpMyAdmin)

Database Optimization and Repair

Published · Updated 1 min read
Knowledge base article
Contents (8 sections)

Keep your MySQL databases fast and healthy.

Why Optimize?

Over time, databases accumulate overhead from deleted rows, fragmented indexes, and unused data. This slows down your website.

Optimize via phpMyAdmin

  1. Go to phpMyAdmin in your control panel
  2. Select your database
  3. Click Check All to select all tables
  4. From the dropdown, choose Optimize table

Optimize via SSH

code
mysqlcheck -u username -p --optimize database_name

Repair Corrupt Tables

If a table is marked as crashed:

Via phpMyAdmin

Select the table → OperationsRepair table

Via SSH

code
mysqlcheck -u username -p --repair database_name

WordPress-Specific

  1. Install WP-Optimize plugin
  2. Schedule automatic cleanups:
    • Remove post revisions
    • Clean auto-drafts
    • Delete spam comments
    • Optimize tables

Performance Tips

  • Index frequently queried columns
  • Remove unused plugins (they often create tables)
  • Keep database under 1GB for shared hosting
  • Use query caching when available
  • Schedule weekly optimization via cron

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app
Database Optimization and Repair - Knowledge Base