Grow your CSS skills. Land your dream job.

Switching a domain for WordPress?

  • # October 21, 2010 at 11:56 am

    Hi everyone,

    I’m encountering a problem with a customer of mine that has decided to switch their domain. I’ll start by saying it’s a godaddy hosted site and godaddy has the domain as well. So hopefully that will help with the context of what I did. We originally built the website for wibd.net (and on the hosted account that was the primary domain I set). The client then decided to change their brand because they went away from the “w” in the name (parent company), and wanted to make the domain 1800vertigo.com to match all of their marketing collateral.

    So, what I did was just go into the hosting control, and changed the primary domain. As you might imagine, the site totally broke and none of the links function. I’m thinking it has to do with how wordpress sees itself in the wp-admin. But I wasn’t able to login to the actual wp-admin any more because none of the urls work.

    How does one go about making the change to alter the primary domain of a wordpress site, with godaddy in mind? Should I just simply add the 1800vertigo.com to the list of urls on the hosted side? Or do I need to perform some database trickery?

    # October 30, 2010 at 3:11 am

    Need to bump this – I’ve gotten to the point where this weekend I need to get the site moved. So hopefully someone can offer some tidbits of wisdom, otherwise I’ll be trial and erroring :)

    So, I’ve read through the changing site URL instructions here: http://codex.wordpress.org/Changing_The_Site_URL. What I’m having a hard time understanding is the “Relocate Method” different than just changing the functions.php and wp-config.php and then updating the blog in the general tab?? Or is the Relocate Method just the next step?

    In other words, based on the fact that the blog is staying in the same location, but we’re switching the primary domain, can I accomplish this by doing the simple changes to the functions.php and wp-config.php and I’m good with a few more tweaks? Or am I in for one hell of a long process?

    Thanks in advance if anyone can offer any words of wisdom!

    # October 30, 2010 at 8:14 am

    Can you access the database? That’s likely the biggest problem. You’ll need to go into the wp_options table and find the few values that reference the old domain and change them to the new one.

    # November 2, 2010 at 4:32 pm

    Yes I sure can. Hopefully that’s the only place :) I’m basically preparing for the worst where if something happens and the whole thing gets hosed, I’ll just reinstall. It’ll be a few hours of extra work, but at least it’ll get the job done.

    Or I can backup the database and keep trying!

    I’ll update how it works in case anyone has something similar.

    # November 7, 2010 at 12:37 am

    Just a FYI – this was successfully done, and I’d like to express how easy this really was.

    All of the material online suggested that the database itself needed to be altered. I’m not sure if it has to do with WP 3, but when I changed the domain name in the General Settings of the admin panel, and then went ahead and changed the primary domain that was pointing to the server, I went into the database itself and WP had already updated not only the site and home url’s, but it also automatically altered all of the “post” tables to reflect the new domain.

    So if anyone needs to accomplish this, you can hopefully read this and know it’s not too big a deal.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".