Over the last few days my IP address has been changed. Most of the domain names that I have registered (and there are a few of them) seem to work again, but I had problems yesterday with the sub-domain name that I have been using to test my website dev.icedmoments.com. After some cursing, I realised that I could add another sub-domain name, test.icedmoments.com, and then I could continue working.

Well, that was all well and good, until I realised that I could no longer access my blog. Regardless of the fact that the blog was physically located at the new sub-domain, actually accessing it was problematic because the blog’s url (within wordpress) was set to the old sub-domain. So how can you change the url, when you can’t get into wordpress?

Thinking cap on. Oh, okay, I figured that I could change the values in the database but changing a single url (siteurl) didn’t seem to help. More grumbling and puzzling around until I came across this post describing which database values need changing. Taking the advice of one of the comments this is what I did:

  • Using phpMyAdmin, select the wordpress database and Export it to a text file.
  • Use a text editor, find and replace all occurrences of old-domain-name with new-domain-name. Save the file.
  • Back in phpMyAdmin, import the modified file:
    • select the database
    • click on the “SQL” button
    • click on the “Choose file” button and select the file
    • click on “Go”

Phew! blog is back…

Categories: Geekery

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *