WordPress.org

Ready to get started?Download WordPress

Forums

Change Primary Domain Name (12 posts)

  1. Awolverine
    Member
    Posted 3 years ago #

    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 http://codex.wordpress.org/Changing_The_Site_URL 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'.

    Thanks!!!!

  2. ... because when you're running a network it saves the domain name in a bajillion places in the database. :D

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

  3. Awolverine
    Member
    Posted 3 years ago #

    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 http://codex.wordpress.org/Changing_The_Site_URL
    7. PRAY

    Does that sound right?

  4. Altstatten
    Member
    Posted 3 years ago #

    No. Pray comes first.

  5. 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.

  6. I'm gonna add a note in the codex.

  7. redone975
    Member
    Posted 3 years ago #

    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 company.com, I'll use devcompany.com. 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?

  8. 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 :)

  9. redone975
    Member
    Posted 3 years ago #

    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.

  10. 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.

  11. 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.

  12. redone975
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic