How to Transfer a Busy Ecommerce Website with Next to No Down-Time

Posted by Paul on April 1, 2016

As your ecommerce business grows, so do demands on your web server - as you add more products, more categories, more customers, more sales, more channels ... your server will eventually also need more power. Sometimes this can be upgraded "on-the-fly", but often a server move will be required.

Of course the busier the site, the more sales you'll be making every hour or even every minute and the more each minute of downtime will cost you in lost sales. That's why we developed our own ecommerce website transfer process, designed to keep downtime to a matter of just a few minutes. Blink and you'll miss it.

The Antropy Ecommerce Website Transfer Process

  1. As early as possible and at least 1-2 days before the transfer date, we login to the domain registrar and see if it's possible to to adjust the "TTL". This is the time it takes for DNS changes to take effect, so set this to as low as possible.

  2. During the process no new products or categories should be added and no files uploaded (i.e. to the image library).

  3. We take a full copy of the site to be transferred and get it running nicely on the new server, do some tests and make some test orders.

  4. Assuming all is working well, we put the site on the old server in to maintenance mode.

  5. Next we transfer just the database from the old server to the new server, this should take less than a few minutes.

  6. We take OpenCart out of maintenance mode on the new server.

  7. Now we update the A class DNS records to point to the new server IP address. At this point, because of how DNS works, traffic starts going to the new server and some users will still get to the old server, this

  8. Here's the clever bit; now we can update the old server config.php files to look at the new server database. As soon as this is done, the site will be working for everyone. Total elapsed time at this point may be as little as 5 minutes.

  9. Once DNS propagation is complete (which according to many domain name control panels can take 24-48 hours) the old server is switched off and decommissioned.

  10. All orders are now on the new server, and the site should be running better than ever. It's important to remember to update any cron jobs, 3rd party services and channels that connect to the site with the new server details.

  11. Update the TTL back to a sensible value.

What did you think? Did this process help you transfer a busy ecommerce site with less downtime, or get things working again long before DNS propagation was complete? Let us know in the comments!

blog comments powered by Disqus