Topic

Database Errors and Troubleshooting

Diagnose website database errors involving WordPress, MySQL, MariaDB, credentials, server health, migrations, and connection limits.

Database-layer symptom router

Database errors can be credentials, hostnames, permissions, server health, connection limits, migrations, or slow queries. In WordPress, the visible message is often clear, but the root cause still needs a careful split between wp-config.php settings and the database service itself.

SymptomLikely issueNext page
WordPress says database connection errorCredentials, DB host, or DB service unavailableError Establishing a Database Connection
Error after migrationWrong DB name, user, password, host, or table prefixRepair wp-config.php settings
Intermittent failuresMySQL/MariaDB service, connection limit, or host outageCheck MySQL or MariaDB health
Site shows 500 insteadPHP fatal error or app crash may be primaryWordPress 500

Safe handling

Do not expose database passwords, salts, or private hostnames in public tickets. When sending a host an escalation payload, include the site URL, timestamp and timezone, DB hostname, database name without password, recent migration/change, and whether a direct database login works from the hosting panel or shell.

Related WordPress paths

Use WordPress troubleshooting when database errors appear alongside plugin, theme, cache, or PHP changes. Use the HTTP hub if the visible symptom is a 500 or 502 rather than the database connection message.

Credentials vs service health

A credential problem is usually consistent: every request that needs the database fails until the name, user, password, host, or table prefix is corrected. A service-health problem can be intermittent: the site may work, then fail during traffic spikes, backups, imports, maintenance windows, or connection-limit exhaustion. That distinction decides whether to repair wp-config.php or gather server-health evidence first.

Hosting support payload

Domain:
Time and timezone:
Database host/name:
Recent migration or password change:
Does direct database login work:
Does the error affect wp-admin:
Relevant MySQL/MariaDB status or host-panel alert:

Also include whether the site is a single WordPress install, multisite, or a restored staging copy. That context helps support avoid checking the wrong database or table prefix.

Errors

502 Bad Gateway in WordPress

Troubleshoot a WordPress 502 by checking PHP-FPM, overloaded plugins, theme changes, cache/CDN layers, hosting limits, and logs.

Guides