Platform-specific

    Error establishing a database connection on WordPress

    Why it happens on WordPress

    On shared hosting the database user's connection quota is enforced per account, so a traffic spike or a second site on the same credentials exhausts it while the database server itself stays healthy.

    The fix on WordPress

    Enable a persistent object cache (Redis or Memcached) to collapse repeated queries, give each site its own database user, and set WP_MEMORY_LIMIT explicitly. Check the host's control panel for a connections-per-user cap before raising anything server-side.

    Is Error establishing a database connection happening on your domain?

    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.

    Free, no signup. Runs from outside your network, which is the only way to tell a server fault from a local one.

    If that didn't fix it

    WordPress has its own failure mode, but Error establishing a database connection has a wider set of causes that apply everywhere. The most common one overall is: the database server is down or out of memory.

    All causes and fixes for Error establishing a database connection

    Error establishing a database connection on other platforms and devices

    Monitor this continuously with LemWatch

    A one-off error establishing a database connection monitoring shows you today. LemWatch re-runs the same checks around the clock and alerts you the moment something breaks — free for up to 10 sites, no card needed.

    Last verified: by the Lemwatch research team.