I'm using wordpress on a small e-commerce site (not for the ecommerce, just for the front page and a few others). We would like to get a full duplicate of the site set up on a second server, and then switch over the DNS to the new server's IP address.
Before switching over, of course, we'd like to test out the new server some, update the themes, etc.
I copied over the software and the database, and things seemed ok at first. The new server is accessed just using the IP address, so it's something like http:// 188.8.131.52/mysite.com/, and using an Alias in the apache2.conf (this is on Ubuntu) it redirects this to /home/mysite.com/wordpress/.
However, many of the links go to www.mysite.com/[whatever the link was]. I tried to login to the back end to fix this, and found that even the admin login is redirecting to the real site. So going to http: //184.108.40.206/wordpress/wp-login.php sends me to the login page, and when I login it puts me at www.mysite.com/wp-admin, logged in.
So I'm getting that feeling that I'm making some basic strategic error here. We have a small site, just one server is plenty (db and code). I just want the ability to set up new OS, db software, blog and ecommerce software, etc. and then switch it over. I thought setting everything up on a second server, and switching the DNS registration to the new IP address, would do this (different customers might not all get the new IP address instantly but within a day or so they all would, and anyway no one would see a site which wasn't ready).
So, what is the better strategy for doing this? I don't want to upgrade things like OS on my production server on the fly, and I want to be able to test the new setup using my browser, with real data in it, which is why I copied the code and database from the current prod server. What is the best overall strategy for handling these issues, in a small shop environment? Is there an apache setup which will let this work, or is there a different way to go about testing the new setup as realistically as possible without making changes to the prod server on the fly?