WordPress: One or more database tables are unavailable. The database may need to be repaired.
WordPress can’t read one or more of its tables — they’re crashed (MyISAM), missing, or the table prefix in wp-config.php is wrong.
Seen on:
WordPress
Meaning
Server crashes and full disks corrupt MyISAM tables. Migrations with a different $table_prefix make WordPress look for wp_ tables that don’t exist.
Common causes
- Corrupted tables after crash/disk full
- Wrong $table_prefix in wp-config.php
- Tables missing after a partial import
- Database user lacking permissions on some tables
⚡ Quick fix
- Check $table_prefix matches the tables
- Repair: define('WP_ALLOW_REPAIR', true) then visit /wp-admin/maint/repair.php
- Re-import missing tables from backup
Detailed fix by platform
WordPress
- php
define('WP_ALLOW_REPAIR', true); // remove after repairing // then open https://example.com/wp-admin/maint/repair.php
Shell
- php
wp db check wp db repair wp db tables
How to diagnose
- Prefix — Tables vs $table_prefix
- Health — wp db check
- Disk — Free space on the DB server
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in WordPress
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026