Nuking WordPress — changing the site URL

By | March 10, 2009

I’ve been messing with my domain registration and sites on webfaction. One update nuked my wordpress install. I spotted that loading www.steveneely.org was also hitting other domains I own.

The problem was that my domain updates had somehow altered the URLs that wordpress stores in its database (hyperlinks on blog pages were wrong and the template wouldn’t load).

A quick fix was to alter the active template’s functions.php file and directly after the <?php directive insert:

update_option(‘siteurl’,’http://www.steveneely.org/blog);
update_option(‘home’,’http://www.steveneely.org/blog’);

next, reload the site a couple of times and when fixed remove those two lines.

This is fully documented with other options for fixing at http://codex.wordpress.org/Changing_The_Site_URL