I woke up to a WordPress database error yesterday. The error wasn’t caused by any changes I did to the site but something to do with the server.
I spent hours the night before working on this, a demo of using WordPress to manage a news portal.
With time to kill while waiting for the site to be fixed, I implemented something that had been listed in my “someday” list – customize the WordPress database error message and have the system send you an e-mail when your blog can’t connect to your database. I hate to admit it but I actually enjoyed the downtime as it taught me a lot as well as afforded me the time to play around with something I had long wanted to do.
The hack is surprisingly easy and I enjoyed crafting a database error page that I just might intentionally place wrong config data soon to test my planned addition to the error page.