Work on new WP while keeping the old static site working

http://xxx.xxx.xxx.xxx/tempdomain.com/ is the current root of the WP site i'm working on. I note that the GET request for the site home is /tempdomain.com/

I have to develop a new site for http://realdomain.com.

Now, i can get the domain of the WP site changed to the real one, but i'll want the old site still available until ready to go live, which i can place in

http://realdomain.com/old-site

So the goal is to be able to work on the new site and at the same time keep the old site working too. Somehow, i need to make a request for http://realdomain.com/ or http://realdomain.com go to the OLD site while keeping the WP site working too.

Can you think of a strategy for doing this? If it helps, it looks like the links in the old site look to be relative, as opposed to the WP absolute ones.
LVL 87
CEHJAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineDon't talk to me.Commented:
Easiest way to do this is to develop tempdomain.com locally (use WAMP or XAMPP to get a dev environment) and just change your Windows hosts file to map realdomain.com to 127.0.0.1

That allows you to develop the new WordPress site using its actual domain name on your local machine.  When ready, all you have to do is upload the new wp-contents folder and replace the mysql with the stuff from local.

If not, the other way to do this is just work on the new site at any location/domain name and then follow these steps to migrate:

http://www.experts-exchange.com/articles/10258/How-To-Move-A-WordPress-Site.html
CEHJAuthor Commented:
Easiest way to do this is to develop tempdomain.com locally
That's not too bad an idea but wouldn't allow the (geographically remote) site owner to see progress.

As for migration, thanks for the link. My experience with that so far (your 'method one') is that it's messy and error prone. Of course, had Wordpress supported relative urls, that wouldn't be an issue
Jason C. LevineDon't talk to me.Commented:
As for migration, thanks for the link. My experience with that so far (your 'method one') is that it's messy and error prone.

Like anything that's homebrew, that's true. In my experience, the migration plugins are almost as error prone so it's a pick your poison situation.

Of course, had Wordpress supported relative urls, that wouldn't be an issue

Yep. Remember PenguinMod (Andrew Nacin)? He's now one of the WordPress leads, wrote a defense of why WordPress doesn't use them:

https://core.trac.wordpress.org/ticket/17048

Of course, there's a plugin for that:

https://wordpress.org/plugins/relative-url/
10 Holiday Gifts Perfect for Your Favorite Geeks

Still have some holiday shopping to do for the geeks in your life? While toys, clothing, games, and gift cards are still viable options for your friends and family, there’s more reason than ever to consider gadgets and software.

CEHJAuthor Commented:
the migration plugins are almost as error prone so it's a pick your poison situation.
Yes, i'd much prefer poison that i've prepared myself from known ingredients than someone else's. Otherwise, you're just applying a kind of reverse Occam's Razor.

PenguinMod ... wrote a defense of why WordPress doesn't use them:
Yes, i discovered that a while back when i first experienced the delight of trying to move a site. It was as unconvincing then as it is now ;)

Of course, there's a plugin for that:
My heart always sinks a little when i hear that ;) It's kind of a WP version of "have you tried turning it off and on again?"
Jason C. LevineDon't talk to me.Commented:
My heart always sinks a little when i hear that ;) It's kind of a WP version of "have you tried turning it off and on again?"

Which, depending on the issue, works about 90% of the time and I'll let you extend the analogy from there :)

The big four ways to do testing with WordPress boil down to:

1) Having a local replica of the site
2) Having an IP-only replica of the the site for remote preview and learn to change the DB on migration
3) Going full developer and setting up a staging server with git to push to production or finding an ISP that has all of this built-in for you (WP Engine)
4) Stick the new site in a sub directory and deal

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJAuthor Commented:
I'm toying with another idea - see what you think:

a. get another domain (the same name, but a .eu domain)
b. do the dev in that domain
c. redirect (when live) the old .biz domain to the new .eu one
Jason C. LevineDon't talk to me.Commented:
That's basically the same as my #2 above, just reversing from transferring to redirection. It would work provided that you do all the necessary redirect command to change .biz to .eu.
CEHJAuthor Commented:
Thanks Jason. Another more general question coming up
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.