WordPress.org

Ready to get started?Download WordPress

Forums

Graceful "Error establishing a database connection" ?? (2 posts)

  1. yorokobi
    Member
    Posted 2 years ago #

    I am webmaster of a site on 1and1, and their system is configured so that the SQL databases are on a different computer then the WordPress site (note this is self hosted not using their TERRIBLY outdated "one click" install)

    Anyway, THAT means that if the SQL server gets overwhelmed by someone else, or goes offline, then the website displays

    "Error establishing a database connection"

    I'd REALLY like to make that into a graceful screen, "Please try again later, or try these links (links to other related URLs)" or something like that.

    So... Is there a plugin for this ? (I searched but found nothing) or does anyone know of a hook to use - as is good practice, I don't alter core WP files.

    TIA.

  2. yorokobi
    Member
    Posted 2 years ago #

    FOUND IT.

    It seems you can add a page named 'db-error.php' to your 'wp-content' directory and THAT will be displayed instead of the generic default "Error establishing a database connection" message.

Topic Closed

This topic has been closed to new replies.

About this Topic