Every WordPress page is built from a database: your pages, posts, orders and settings all live there. This message means WordPress could not log in to that database, so it has nothing to show. Your content is almost always still there. The cause is usually one of three things: the login details changed, the database server is down or overloaded, or some tables are damaged. Below is a rebuilt example (not a real client), then how to tell which cause you have and the safe order of steps.
yourbusiness.com/wp-admin. If it says "One or more database tables are unavailable. The database may need to be repaired", the login works and some tables are damaged. If it shows the same connection error, keep going.wp-config.php and read DB_NAME, DB_USER, DB_PASSWORD and DB_HOST. Compare them with the database and user listed in the host's control panel. A move to a new host very often leaves an old DB_HOST or database name behind; some hosts use a server name rather than localhost.DB_PASSWORD. Check that the user is still attached to the database with all privileges; a move can drop that link.define('WP_ALLOW_REPAIR', true); to wp-config.php, open /wp-admin/maint/repair.php, run Repair Database, then remove that line again: the repair page works without a login while it is on.| What you see | What it means | Usual fix |
|---|---|---|
| Error started right after a move to a new host | wp-config.php still names the old database, user or server | Copy the new host's database name, user, password and server into the four lines |
| Error started after a hosting password or security reset | The database user's password changed and WordPress still uses the old one | Reset the database user's password and update DB_PASSWORD |
/wp-admin says tables are unavailable or need repair | The login works; one or more tables are damaged, often after a crash or a full disk | WP_ALLOW_REPAIR, run the repair, remove the line |
| Error comes and goes; other sites on the account also fail | The database server is down or hitting its limits | Host's status page and support; then caching, bot blocking or a bigger plan |
| Control panel warns the disk is full or the account is suspended | The database cannot write, or the host stopped it | Clear old backups and logs, or settle the account with the host |
wp-config.php.WP_ALLOW_REPAIR switched on afterwards.If you can open your host's control panel and a file manager, the steps above are usually enough. If the site earns you money every hour it is down, that is what the box below is for.