The MU forums have moved to

Moving servers: How to build test WPMU install with correct URL (7 posts)

  1. endortrails
    Posted 14 years ago #

    I'm moving from one server to another and the transition is proving trickier than expected. I have installed WPMU on the new server and am attempting to start developing, but after initial install, I attempt to login and am redirected to my existing, old server.

    The new server provides a site preview URL, which starts with my server's IP address and drills down to the exact directory where I have WPMU installed. If I add the site preview URL when installing WPMU, things go haywire.

    So, my question is: How can I build this new WPMU install on my new server without being redirected to my existing install on my old server?

  2. andrea_r
    Posted 14 years ago #

    WPMU stores the domain info in a ton of places in the database. What we did recently is change the hosts file on our computers so we were the only ones who could see the domain at the new site we were working on.

    When it was ready, all we had to do was change the domain info and the site was live for everyone else.

  3. cafespain
    Posted 14 years ago #

    Edit the hosts file on your development / testing machine so that when you access the domain it points to the new / test install instead of the old one.

  4. Klark123
    Posted 14 years ago #

    This is great. But, it doesn't let others see the new site (without editing their hosts file). It would be nice to, say, bring the new site up at and then, when the time comes to launch, change the name to

    Has anyone done this? I don't mind doing a find/replace in mysql, but I wonder what kinds of problems I'd run into.


  5. andrea_r
    Posted 14 years ago #

    Yes, people have done that too. It's just there's a number of places in the db to change the domain name just for the main blog, plus any sub-blogs.

  6. endortrails
    Posted 14 years ago #

    Thanks everyone. Note: The solution andrea_r provides works for me. Here is an overview of my issue and how I resolved it:

    The problem
    I am in the process of moving servers and when I attempted to install WPMU on the new server, I was continually redirected to the existing site on the OLD server when attempting to login after installation.

    The fix
    Please note that I am on a Mac, running OSX 10.5.8.

    1. Open Terminal (located in your Application/Utilities folder)
    2. Type "sudo su" minus the quotes.
    3. You will be prompted for your password. Enter it.
    4. Type "pico /private/etc/hosts" minus the quotes
    5. Pico is Terminal's text editor. The above line tells Terminal to edit the hosts file (located in /private/etc/)
    6. Add "" minus the quote marks somewhere in the page. Important: Change to the IP address of your server, where you are testing your new site. is the domain name that you want to map to the IP address.
    7. Exit, by clicking Control + X
    8. Save the changes

    Now, when you visit, your computer loads the IP address that you supplied to your computer's host file (above). Everyone else still sees your old site and only your computer sees the one in devlopment. When you are done with development, open Terminal again, edit the host file like we did above, and remove the line we added above.



  7. Klark123
    Posted 14 years ago #

    Thanks Thad.

About this Topic

  • Started 14 years ago by endortrails
  • Latest reply from Klark123