devgeniem / better-wp-db-error
Better WordPress database error handling.
Installs: 59 892
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 7
Forks: 1
Open Issues: 2
Type:wordpress-dropin
pkg:composer/devgeniem/better-wp-db-error
Requires
- php: >=5.6
- composer/installers: >=v1.0.12
- koodimonni/composer-dropin-installer: ^1.0
This package is auto-updated.
Last update: 2025-10-20 18:04:20 UTC
README
WP Dropin: Better db-error.php
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 availablestatus code instead of200 OK - It shows database connection debugging to frontend when
WP_DEBUGis 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:
Error Page showed to site visitors:

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

