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.
One or more database tables are unavailableThe database may need to be repairedTable 'wp_options' doesn't exist 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
- Critical error WordPress: There Has Been a Critical Error on This Website
- Call to undefined function create_function() WordPress on PHP 8: Fatal error: Uncaught Error: Call to undefined function create_function() / each()
- Installation failed: Could not create directory WordPress: Installation failed: Could not create directory (plugin/theme install or update)
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026