Repairing a corrupted database table
Occasionally a database table can become corrupted - often after an interrupted write or a server issue - and your site shows errors like Error establishing a database connection or Table marked as crashed. This is usually fixable.
Repair in phpMyAdmin:
- Open phpMyAdmin and select the affected database.
- On the table list, tick the box next to the problem table (or Check all).
- From the With selected dropdown, choose Repair table.
You can also run Check table first to see which tables report errors, then Optimize table afterwards to tidy them.
WordPress built-in repair: add define('WP_ALLOW_REPAIR', true); to wp-config.php, then visit https://yourdomain.ae/wp-admin/maint/repair.php and click Repair Database. Remove that line afterwards for security.
Before repairing anything important, export a backup so you can restore if needed. Note that repair works for MyISAM tables; InnoDB tables are usually repaired by restoring from a backup. If a table cannot be repaired, restoring the database from a recent backup is the reliable fix. Our team can run a server-side repair or restore for you - reach us 24/7 on WhatsApp +971 58 553 6767.
Still need a hand? Our UAE-based team is here 24/7.