Moving and Testing your e-commerce site

So, you decided to move your e-commerce website to another hosting provider. The site has been moved, and, you want to test it to make sure that it works before you switch DNS. After all, you don’t want your site to be down, you want it up accepting orders! But, you notice you can’t navigate your new site using a test domain.
We often get the question about how to test a site when it is in a transition state. i.e., you have a website at www.yourdomain.com and you have moved the software and database to a new server. But, you want to test it there. What is the best way to do this.

Of course, there are many ways to do any given task. If you decide to change the domain, to say test.yourdomain.com, this poses some problems. For example, you will almost certainly find all your links still point to www.yourdomain.com, so, while you may be able to see the home page, you can’t navigate the site! So, yes, you can then go and re-setup the software, perhaps change some database settings that deal with domain, edit some files, etc. Then again, you may have some other links hard-coded here and there to your domain. So, it becomes a lot of work to change all that to get a good test. And, by the time you’ve changed everything you need to, who’s to say it’s really the same as what you started with and that your test is valid!

So, to test the site itself, the best way is to simply change your local settings to pint to the new server! Traditionally, this is called a hosts file. On Linux and similar systems, it’s almost always /etc/hosts and you will need to be root to change it. On Mac OSX, you can find it there also and you can either use the terminal windows and sudo to change that file, or, use TextWrangler (freeware) if you have it and use the “Open File By Name” menu option. On Windows, the file can often be found at c:\Windows\System32\drivers\etc\hosts, however, you may run into security issues. You can get the workaround from Microsoft Support.

You simply add a record such as:
10.0.0.1 www.yourdomain.com

This says when I try and access www.yourdomain.com, use the ip address 10.0.0.1 and ignore DNS (change both to match your settings). In this way, you change nothing on the site and you can freely navigate just as a user might.

When you are done testing, just make sure to remove that line from your hosts file, or, comment it out by adding a leading #.

The only other issues to worry about are callback style payment systems such as Google Checkout which need to call back to your site to test. For these, you really do need a test account for the service (example, Google Checkout Sandbox) and you would want to use your IP address as the postback address, such as http://10.0.0.1/googlecheckoutmoving_and_testing

These testing techniques are proven techniques to make testing your move simpler, and, more accurately test the environment the user will have when the site moves. It is best to be certain the site will work once you change your DNS settings.
blog comments powered by Disqus

© 2017 by 5 Diamond IT Consulting, Contact Us
Privacy Policy | Site Map

Open source software we work with includes Apache HTTP server, cURL, Fedex Shipping for osCommerce and Zen Cart, MySQL, Mariadb, osCommerce shopping cart, PHP, and Zen Cart shopping cart. We offer services such as shell scripting, HP3000 consulting. Tools we recommend for small business include KALL8 toll free phone service, VOIPo VOIP phone service