Moving WP website from one server to another (while keeping the domain the same)

I’m in the process of moving a Wordpress website from one web server to another. Now I’m familiar with the technical details of the WP transfer, but the problem I’m having is how to keep the domain name the same.

My idea is to copy the WP files/database to the new server, under a new (test/dev) domain name, and then re-direct the old (real) domain name to this new server.

But that means I’d have to buy a new domain name to discard after I’m done, and a hosting package that enables at least two websites (domains), encountering extra costs. Is there any way to avoid this?

Thanks for any possible suggestions.

You can just navigate to it using the server IP. You don’t need a second domain.

Something like http://42.77.42.123 will work.

Move it.
Test it by IP resolution.
Point domain at the new IP when it’s ready.

1 Like

You can also add an entry to your computer’s hosts file so that your existing domain will point to the new server as far as your browser is concerned, which will allow you to test the site properly (the links will still work correctly).

1 Like

That’s true. But too much work. lol

I don’t think you can use the admin area unless you do - it does redirects based on the site URL in the DB.

3 Likes

Ah right. Good call then. I forgot WP is weird.

Another option is doing a sub domain and point that at the new host.

http://test.yoursite.com

1 Like

@Mawburn and @fretburner – thank you guys! :smiley: This was really helpful and I would not have figured it out by myself.

Going through the IP route and then updating the computer hosts files worked as a charm!

Thanks again!

Might also want to check out this Wordpress Plugin: Migrate DB Pro

Enables dynamic database syncing between multiple Wordpress installs be they dev or otherwise

I also strongly suggest purchasing Backup Buddy. We manually moved sites and tried other options for years, but as far as migration goes, it one of the better solutions and does all the renaming for you.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.