Is there a plugin that will override the “Error establishing a database connection” message?

My provider’s database server recently had some downtime and my site was displaying the classic “Error establishing a database connection” message for about an hour.

I knew what the problem was but realised it would be useful if I was able to replace that message with something a little friendlier (ideally a more verbose message contained within my site’s template, so as not to scare users).

Read More

My question is: are there any plugins that provide this functionality? Or does this error occur at too low a level for any plugins to be invoked? If so, I’ll probably edit the WP core, but it would be nice to use something more pluggable.

Many thanks,

Biggs

Related posts

Leave a Reply

2 comments

  1. I’m not aware of such a plugin, and will be happy to upvote any appropriate answer.

    On the other hand, a way not to display this message is not to have the error any more. On most hosting providers, connections are refused when the maximum number of open connections is reached.

    A cache plugin (such a WP Super Cache) will drastically decrease the number of connections and make this error message less frequent.