The Hurdle In Upgrading
May 15, 2005 – 01:50 | wordpressThis happened when I tried to upgrade to WordPress 1.5.1 which came out a few days ago. Upgrading my local sandbox server was pretty straightforward. Everything up and running in 10 minutes. So I happily headed to the real deal and uploaded everything from the local sandbox. Only to get this scary (because it was all happy in the sandbox!) error whichever page I tried to access:
Fatal error: Call to undefined function: get_bloginfo()
wp-includes/wp-db.php on line 304.
After a few grep’s into the source code and some hair pulling, here is the ‘why, why, why!’ that is so seemingly innocent - when uploading the files, I accidentally overwrote wp-config.php with the DB settings for the sandbox. Obviously WP would fail to connect to the real DB with those. What’s not so obvious is the error message, which neither shows what really went wrong, nor where it actually did.
Out of curiosity, I googled a bit, and found a lot of folks actually ran into this error. Perhaps the WP developer team might consider explicitly testing the DB connection and giving an error message in a fail-fast manner in next release?
