Home » Item #576
If the need should arise, how easy would it be to move a live CactuShop to a new server/hosting provider with the minimum disruption/downtime? What would be the steps involved in such a move?
After confirming that the new host fully supports all the requirements to run CactuShop, there are still a number of issues to consider.
If running your site with an Access database, this is collecting data all the time while online, including stats, customer info and order info. If you simply take a copy of the whole site and move it to another location, then set the domain to point at this new hosting, there will a period of maybe a day while the DNS change filters through the internet. This means that for 24 hours, some users will be looking at the old site while others will see the new one. This is obviously problematic since each site will be allocating the same order numbers to what are different orders.
To overcome this, the best solution is to have some way to see the new site instantly when you 'switch' over to it. If your host lets you connect to the site with an IP address, that will work. Otherwise, it is worth registering a temporary domain name and mapping this to the new web space. To handle the switch, close the old site and take a copy. Upload this to the new site. Next, put this line at the top of the config file in the old site:
response.redirect("http://newsite.com")
From now on, all users hitting the old site will be forwarded to the new temporary URL or IP of the new site. This way, the switch can be accomplished with a few minutes downtime (depending on the time it takes to download and upload a copy of the site).
Once this is done, you can change the nameservers on the old domain to point to the new site too. As the change filters through the global DNS system, some users will hit the new site directly, others will be forwarded to new site after hitting the old site.
Moving SQL Server sites is generally a little easier. Close the old site, take a full back up of the database and then upload to the new SQL Server. Next, set the database connections on BOTH the old and new sites to point to this new database. You can then set both sites live and point the nameservers for the domain to the new hosting. Requests on the old site will still see the new SQL database, as will those hitting the new site.
Remember that if you upload images to the site during the 24 hour period in which the nameserver changes are filtering through, they will only be on one of the sites (the one you're hitting the back end of). However, since images are assigned the ID number according to the item they relate to, there is no possibility of two images clashing. The worst that may happen is that you will have to reload those images.
You will generally need to review your config settings after moving a CactuShop. Some settings such as the emailmethod or mailserver will probably need to change.