[wp-hackers] Personalizing db down WordPress errors

Paul Menard paul at codehooligans.com
Fri Aug 3 14:31:01 GMT 2007


On Aug 3, 2007, at 5:17 AM, Peter Westwood wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chetan Kunte wrote:
>> Personalizing this "database-down" error message using the active
>> Wordpress theme would be a better idea [and should be in the core].
>> What do you'all think?
>
> If the db is down then you don't know what the active theme is ( or  
> for
> that matter any other of the options values).
>
> The best that can be done is providing a single plugin-in mechanism  
> for
> replacing the page e.g. is a file in wp-content called db-error.php
> exists then include that rather than use the normal error output  
> handler.

For what it's worth I found these two articles last summer. They  
offer instructions (for the then version of WP) for hacking your WP  
code to display friendly DB error messages. We use this on some of  
the higher traffic site when requested by the client. It's some  
pretty simple steps. Just create a static file via view source from a  
browser and save to a file.

http://5thirtyone.com/archives/408
http://allforces.com/2006/06/18/custom-wordpress-errors/

Westi, would like to know more about using the db-error.php file you  
mentioned. I've checked the code and don't see referenced to this  
file in any of the WP core.

Paul


More information about the wp-hackers mailing list