I’m not sure why, but for some reason earlier tonight our MySQL server had some kind of hiccup. It was only a few minutes after the Secret Invasion Reading Order update, actually.
It didn’t last too long (less than an hour) but during the downtime the site only displayed a single line of bold text. It just said “Error establishing a database connection”.
You may have seen that error before. I didn’t think it was very helpful to visitors (though certainly motivating to me!)
I spent a few minutes researching and found out that in modern wordpress, all I needed to do was whip up a custom php page, point it directly to my theme’s style sheet (since the database wouldn’t be able to handle any link redirection), remove any dynamic php, rename it db-error.php, and drop it into the /wp-content/ directory. Sweet!
In old versions you had to hack the wp-config code in order to direct to an error page, so I’m glad that it’s been made easier (and since 2.3 even – guess I’m lucky we haven’t had too many database errors.)
It didn’t take long to modify the home page template into a concise little error page.
You can see that here if you’d like – and hopefully you’ll never see it while actually trying to use the website!
Edit: I’m gonna timestamp this post as before the SI reading order, actually, just so it’s not at the top of the front page – I don’t think first time visitors will care as much about this maintenance stuff.
Oh, and yeah, “appreciate” is misspelled in that screenshot. I fixed it ;)