Support » Networking WordPress » Change Primary Domain Name

  • Our business just purchased a new domain name, which is what we want our network to be called. Problem is, that I have been working on everything over the past few weeks on a totally different domain name.

    We don’t need to move files or change servers, just change the primary domain name.

    I tried this but lost access to the old domain and still couldn’t access it under the new domain.

    The new domain is pointed to my host’s DNS servers and parked in my host’s control panel.

    What would be the best way of going about this.

    I thought for a minute, that I would have been able to go into the site options under super-admin but it doesn’t give me the option to change the domain name in ‘site 1’.


Viewing 11 replies - 1 through 11 (of 11 total)
  • … because when you’re running a network it saves the domain name in a bajillion places in the database. 😀

    So, go get a db dump, toss it in a text editor, do a nd/replace & restore it.

    So …

    1. Backup tables wp tables to a sql file
    2. Open in a text editor
    3. Find all domain instances, replace with new domain
    4. Dump all of the tables in the existing wp database
    5. import sql file
    6. Then edit wp-config file via
    7. PRAY

    Does that sound right?

    No. Pray comes first.

    Frst and last, but yeah, that’s the idea. Hopefully step 8 is beer.

    Don’t follow the changing site URL codex doc, though, for editing your WP-configuration file. You’ll be better served just search/replacing the file on your own.

    I’m gonna add a note in the codex.

    So, should I use this strategy for the following?

    I’m working on a redesign project that will use a multisite WP implementation (my first experience w/ multisite). Their old site is still live and they would like to keep it that way while the new site is developed. So, I’m trying to figure out the best approach for building the site(s) in a development area and then flipping the domains when it’s time to push the site live (the code will stay on the same server, just have to point the previous URL to the new server).

    Usually for normal WP implementations in this situation, I buy a temporary “dev” domain. For example, if the site URL is, I’ll use When it’s ready to go live, I switch the directory name to the live domain and update the code and db w/ a find and replace removing the “dev” portion from the URL.

    Is this the approach I should take? Should I hold off from creating subsites until I switched the domains?

    It could work. I don’t see any reason why not, and it’s really a matter of what kind of work you want to toss yourself in for 🙂

    Yeah, I feel like I’m crossing my fingers on this one and hoping the domain switch isn’t too much of a headache.

    It seems like there should be some best practices documentation/recommendations for this type of stuff, especially for a new feature.

    We’re working on it 😉 Right now it involves beer and prayer 😉 Once more people get working with it, we’ll have a better idea of ‘best’. Remember, MultiSite is pretty new.

    When it’s ready to go live, I switch the directory name to the live domain and update the code and db w/ a find and replace removing the “dev” portion from the URL.

    that IS best practise.

    Or, some of us have a local install that is an except mirror and change our local computer’s hosts file to show the local installation for that domain. Huzzah! Looks like the live site, but you’re working locally. Seriously less time that running thru the db.

    that IS best practise.

    Always good to hear I’m on the right track. I think I’m going to try and give the local install (using MAMP) a shot.

    Thanks everyone.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Change Primary Domain Name’ is closed to new replies.