devgeniem/better-wp-db-error

Better WordPress database error handling.

Installs: 55 333

Dependents: 0

Suggesters: 0

Security: 0

Stars: 11

Watchers: 9

Forks: 1

Open Issues: 2

Type:wordpress-dropin

1.0.0 2017-01-24 08:10 UTC

This package is auto-updated.

Last update: 2024-10-20 15:22:31 UTC


README

geniem-github-banner

WP Dropin: Better db-error.php

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

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.

Project Goals

The error message page is currently only in Finnish but we have plans for adding other languages as well.

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": {
        "devgeniem/better-wp-db-error": "^0.1"
    },
    "extra": {
        "dropin-paths": {
            "htdocs/wp-content/": ["type:wordpress-dropin"],
        }
    }
}

Screenshots

Output from terminal:

Generated Error output in command line with wp-cli

Error Page showed to site visitors: Error page to site visitors (in Finnish)

Credits

We used alexphelps/server-error-pages as base for this.

License

GPLv3