When is a bug not a bug? Well, when its a feature!

I’ve struggled for ages to upgrade my Wordpress blog to version 2.0. Every time I tried, I would get the dreaded, “It doesn’t look like you’ve installed WP yet, Try running install.php” error.
Try as I might, I could never get it to work. And if you search around on Google, you’ll find I’m not the only one.

So, this may not be a fix for all of you, but it was for me. The first question I’ll ask, were you trying to upgrade on the very same domain and root path as your old system? If so, I’m afraid this won’t work for you.

If not, then your a lot like me (though I hope your not gaining loads of weight and occasionally chain smoking).

I personally like to follow the model whereby any development work that impacts the fron end (i.e. the part the user see’s), is done on another domain or server location. Why? Well its just good practice. That way, you can blow the whole damn thing up, drop the database, or just have a good play without impacting your user.

However, Wordpress introduces a check in their code to see if the server URL matches the config. Check out line 121 of wp-settings.php

$db_check = $wpdb->get_var(”SELECT option_value FROM $wpdb->options WHERE option_name = ’siteurl’”);

The check is seeing if the siteurl is a match for the current page. If there is not a match, it then displays the “…doesn’t look like you’ve installed” error.

While I’m not a developer, I don’t believe that is proper logic. Sure, maybe the check is needed for some other reason that I’m not aware. However, for migration purposes surely there could be a fallback exception that says “Everything ok! Migrate your DNS” or whatever.

If you are indeed migrating to a new location. Simply go into mysql/phpmyadmin and navigate to wp_options. Inside is a field called “siteurl”. Simply change that to match your current location (or IP address). Once you are happy, and ready to make the switch, then just revert that field to your URL.