Skip to main content

Move a Site from a Host Abroad to One in India

Move a WordPress site to our host in Palitana. Here is how to switch DNS, swap the cert, and watch the site for two weeks. We check it all with you and the team.

Cover image for Move a Site from a Host Abroad to One in India

You run a live site on a US or EU host. Your main clients live in India. Then three things cost you money. The delay for your users. The exchange rate on your invoice. And the gap in the law that covers user data. That law is the Digital Personal Data Protection Act (DPDPA) 2023. This post walks through the move to servers in India. Your site stays up the whole time. The move is the moment your users start to reach the new server. Nothing about your site changes for those who use it.

Before you start.

Take a base reading first. Take a screenshot of your p95 delay. Take it from the host's dashboard. The p95 is the delay that 95 out of 100 visits see. The other five are faster. Note your monthly bandwidth use. Note your storage use as well. Export your database. Use mysqldump, pg_dump, or mariadb-dump. A dump is a full copy of your data in one file. Save your Secure Sockets Layer (SSL) key. Save the middle cert too. It sits in the middle of the SSL chain. List all cron jobs. Also list all the outside services your app talks to. A cron job is a task your app runs on a schedule. Those are SMTP, S3, your payment gateway, and your tracking tool.

You need all of this to check that the move did not lose a thing. Keep it safe until the new server has run for a week. That list is your net.

Step 1 - Set up the server.

Message us on WhatsApp with the traffic and storage you expect. We pick the right plan for you. You order it in the dashboard. A plan is the set of parts you get and the price. An Apps plan fits a small WordPress site. A larger Apps plan fits a busy WordPress site. So does Linux Dedicated. It fits ERPNext with over 50k monthly visits. We set up the container. We set up the database. We set up the object storage and the SSL. It is all done within 4 hours.

Step 2 - Move the data.

Use scp to move the app files to the new container. Move the dump as well. Restore the dump into the new database. Run your smoke tests on a test site. Do that before you change DNS. The test site is a safe place to try things. Nothing on the live site changes until you say so. A smoke test is a quick check that the site still works.

Step 3 - Cut over DNS.

Lower your DNS TTL to 60 seconds. Do it at least 24 hours before the move. DNS stands for domain name system. The TTL tells the world how long to hold on to your old address. That way it is gone before you change the A record. Your domain name stays the same. Only the address behind it moves. When the time comes, do these three steps.

  • Point the A or AAAA record at the Palitana load balancer IP. The load balancer is the front door. It sends a request to the right server. An IP address is the number that points to your host. We send it with the cut-over email.
  • Watch the traffic graphs in the old and new dashboards. Do this for the next hour. You can keep the old server on for a while, just in case. Expect the old IP to serve a few slow users for half an hour.
  • Get a fresh Let's Encrypt cert for the new container. The old one was signed by your old host's ACME client. ACME is the system that hands out free certs. Let the old one expire on its own.

Step 4 - The checklist after the move.

For the next two weeks, watch these.

  • DNS lookups from the big Indian ISPs, such as Jio, Airtel, and BSNL. An ISP is a firm that gives your users internet.
  • The SSL chain from a clean client. A clean client is one that has never seen your site.
  • The connection pool for the database. A pool is the set of open links to it. A bad new pool is the top cause of the reports we get. All of them say the same thing. The site is down for the first 24 hours after a move.
  • Any outside webhook that was pinned to the old IP. A webhook is a service that calls your app when it happens.

We run a free health check after the move. We do it on day 7. We do it again on day 14. The old and new servers can run side by side for a while. Message us on WhatsApp. Book the slot there. It takes one message. We reply the same day.

Written by

WebHost24

Hosted in India, written in English

  • 6 min read

Share this post

Need help?

Ask us on WhatsApp

Our team replies during Indian business hours. Ask us anything about hosting, and we will help. We are the people who run the servers, so we can answer the hard ones too.

That is the end of this post. If you want to keep reading, the posts below are the ones we share with it. We write every post ourselves, and each one stands on its own.

We write about hosting, servers, backups, and the day to day work of running a site for a customer. There is no sales pitch in a post, and every post is free to read.

We write them for the people who run a site from India, and we keep the words plain. We do not write for a prize, and we do not sell you anything here. Read the post, take what you need, and ignore the rest.

Related posts

We rank these by the tags they share with the post you came from. Read one to learn more. Every post is free to read.

Cookie Preferences