alexsancho/wp-db-error

WordPress database error handling.

Installs: 3 639

Dependents: 1

Suggesters: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:wordpress-dropin

v1.0.3 2018-03-28 11:18 UTC

README

Build Status

This db-error.php dropin enhances default "Database connection error page".

  • It gives better connection error debugging for administrator when using wp-cli.
  • It shows nice error message for end users.
  • It returns 503 Service not available status code instead of 200 OK
  • It shows database connection debugging to frontend when WP_DEBUG is used.

Installation

You can copy db-error.php to your wp-content folder. Just plug&play.

OR you can use composer so that you can automatically update it too. Put these in your composer.json:

{
    "require": {
        "alexsancho/wp-db-error": "^1.0.0"
    },
    "extra": {
        "dropin-paths": {
            "htdocs/wp-content/": ["type:wordpress-dropin"]
        }
    }
}