moving from cpanel to cpanel server with zero downtime


Well-Known Member
Apr 28, 2011
cPanel Access Level
Root Administrator
If the site is "active" at all (ecommerce, forums, etc), then no, I don't believe "zero" downtime is possible. However, an idea along the lines of what milind said would reduce the downtime to "very little":

  1. Reduce the TTL on the current domain's A record to 1/2 hr (or as short as possible).
  2. Wait the length of time of the previous TTL before continuing. This allows previously cached DNS queries to expire, and receive the new ultra-low TTL.
  3. Set up an A record for (or whatever) and point it to the new server's IP.
  4. Create an .htaccess rule on the old site to direct everyone to the "Maintenance" page you've designed specifically for this event. The idea is to make sure no changes can be made to the database until the site is on the new server. Make sure you return a 503 header so search engines know that this is a temporary issue, and not to index the maintenance page.
  5. Move the files and database to the new site.
  6. Change the .htaccess rule on the old server to give a 307 redirect (Temporary Redirect) to (or whatever). The 307 is again important because you don't want search engines to continue accessing the fake www2 subdomain once this process is finished.
  7. Update the original domain A record (www) to point to the new server's IP, and reset the TTL to a day or more.
  8. Wait a few days, check the access logs on the old server. If there are no hits, then everyone has received the new DNS records and you're free to kill the site on the old server.
And there you have a minimum down-time site transfer. Note that if you try this with an SSL site, people's browsers will throw all sorts of security warnings due to the domain not matching the certificate. It's not really recommended in this case. It's better to have some downtime than to have people think your site is insecure because they don't understand the browser messages :)