Changing domain in wordpress


So to at least make an effort at testing the wordpress upgrade to make sure no one’s blog theme/widgets ended up completely broken I made a beta site. Since wordpress stores the URL of its blogs in the database this was initially problematic. sed and mysqldump made it a quite easy transition though.

Dump your database:
mysqldump wordpress -p | mydatabase
sed ‘s/blogs\.dootdoot\.com/new\.domain\.here/g’ mydatabase > mynewdatabase

Then import back into mysql, change your wp-config.php domain and things should be cricket. This probably could be filed under “stupid simple” as far as location changing goes.  Although I should add that if you were trying to move to a type domain, wordpress ignores the www