Cloudflare caches the error page itself, so visitors keep seeing the database error for minutes after the database is back.
Cloudflare caches the error page itself, so visitors keep seeing the database error for minutes after the database is back.
Purge everything in Cloudflare → Caching after the fix, and set a Cache Rule that bypasses cache for 5xx responses so a future outage does not stick.
Cloudflare has its own failure mode, but Error establishing a database connection has a wider set of causes. The most common one overall is: The database server is down or out of memory.
Check the database service status and its error log. An out-of-memory kill on a small VPS is the classic cause of an intermittent version of this error.
An external probe records whether the failure is constant or intermittent, and captures the exact minutes it occurs — which is what distinguishes wrong credentials from connection exhaustion.
Cloudflare caches the error page itself, so visitors keep seeing the database error for minutes after the database is back.
Purge everything in Cloudflare → Caching after the fix, and set a Cache Rule that bypasses cache for 5xx responses so a future outage does not stick.
WordPress loaded but could not connect to MySQL. Either the credentials in wp-config.php are wrong, the database server is down, or connections are exhausted under load.