How to Move a WordPress Site to a New Host Without Downtime
Move your WordPress site to a new host with no downtime and no lost email. A step-by-step guide for site owners in Nepal and anywhere else.
By Bishal KC, Fullstack Developer · Reviewed by Wordpress Developer · · 7 min read
See free migration
How to Move a WordPress Site to a New Host Without Downtime
Table of contents
Key takeaways
- Keep both copies running. Copy your site to the new host while the old one stays live, so visitors always reach a working site.
- Lower your DNS TTL to 300 seconds a day ahead. The switch then spreads in minutes instead of hours.
- Test before you switch. Use your computer's hosts file to check the new copy privately before anyone else sees it.
- Change only the A record if you can. Your email stays untouched; if you change nameservers, copy your MX and email records first.
- .np domains need extra time. Nameserver changes go through register.com.np and can be slow, so change the A record or plan ahead.
- Keep the old hosting for a week. Cancel only after email, orders and comments are reaching the new site.
How to Move a WordPress Site to a New Host Without Downtime
Short answer: Copy your whole site to the new host while the old one keeps running. Test the copy privately, then point your domain to it. For a few hours both copies are live, so visitors always reach a working site. Keep the old hosting for a week, then cancel it.
That's the whole idea. The rest of this guide covers how to do each step, and the few things that catch people out: email, payment gateways, .np domains and SSL.
Why do sites go offline during a move?
Sites go down when the old hosting is switched off before the new one is ready. Downtime also happens when the domain points to a new server that has missing files or a broken database. Avoid both and you avoid downtime.
When you change where your domain points, the change spreads across the internet over a few minutes to a day. During that time, some visitors reach the old server and some reach the new one. If both servers have a working copy of your site, nobody notices.
Before you start: a 10-minute checklist
Write down these details before you change anything:
What to check | Where to find it | Why it matters |
|---|---|---|
Where your domain is registered | Your registrar account (for | You'll change DNS here or at your DNS provider |
Where your DNS is managed | Look up your domain's nameservers | This is where you'll point the domain to the new server |
Where your email is hosted | Your MX records, or your old host's email section | Moving hosts can break email if you don't plan for it |
Your PHP version | WordPress → Tools → Site Health → Info → Server | Use the same version or newer on the new host |
Plugins that send or receive payments | eSewa, Khalti, Stripe, PayPal and similar | Some need updated URLs or server details after the move |
Lower your DNS TTL a day ahead. TTL (time to live) is how long other computers remember where your domain points. In your DNS settings, set the TTL of your main A record to 300 seconds (5 minutes) a day or two before the move. The switch will then spread in minutes instead of hours.
Step 1: Take a full backup
Make one complete backup before touching anything, and download it to your computer. It's your safety net if anything goes wrong.
You need two things:
Your files: the whole WordPress folder, including
wp-content(themes, plugins and uploads).Your database: your posts, pages, settings, users and orders.
If your old host uses cPanel, Backup or Backup Wizard downloads both. On other hosts, use the host's own backup tool or a plugin such as UpdraftPlus.
Step 2: Copy the site to the new host
There are three common ways. Pick the one that fits your setup.
Option A: A migration plugin (easiest for most sites)
Plugins such as All-in-One WP Migration, Duplicator or Migrate Guru package your site into one file and unpack it on the new host. Install WordPress on the new host, install the same plugin there, then import. Large sites may hit upload limits on free versions, so check your site's size first.
Option B: cPanel to cPanel (cleanest if both hosts use cPanel)
Make a full cPanel backup on the old host and ask the new host to restore it. This brings across files, databases, email accounts and settings in one go. Many hosts, including us, do this for you for free.
Option C: By hand (most control)
Download your files over FTP/SFTP or with the File Manager.
Export your database from phpMyAdmin as a
.sqlfile.On the new host, create a new database and database user.
Import the
.sqlfile into the new database.Upload your files.
Edit
wp-config.phpwith the new database name, user and password.
Step 3: Test the new copy before anyone sees it
This is the step that prevents downtime. Your domain still points to the old server, so you need a way to view the new copy privately.
Use your hosts file. It makes only your computer load the domain from the new server:
Windows: open Notepad as administrator and edit
C:\Windows\System32\drivers\etc\hostsMac or Linux: run
sudo nano /etc/hostsin Terminal
Add one line, using your new server's IP address (your new host can give it to you):
203.0.113.25 yourdomain.com www.yourdomain.comSave the file and open your site in a private browser window. Check:
the home page, a few posts and pages
that images load
that you can log in to
/wp-adminthat forms send
the full checkout, if you run a shop
that links work; if they show 404 errors, go to Settings → Permalinks and click Save
When you're done, remove the line from your hosts file.
Step 4: Pause changes on the old site
If your site gets new orders, comments or posts every day, anything added to the old site after you copied it won't be on the new one.
Blogs and company sites: don't publish anything until the move is done.
Shops (WooCommerce): pick a quiet time, such as late night Nepal time or whenever your traffic is lowest. Re-copy the database just before switching, so the latest orders come across.
Step 5: Point your domain to the new host
You have two ways to do this.
Change only the A record (recommended). Keep your DNS where it is and change your domain's A record (and www) to the new server's IP address. Your email records stay untouched, so email keeps working.
Change the nameservers. This hands all of your DNS to the new host. It's fine, but you must copy your email records (MX, plus SPF, DKIM and DMARC TXT records) to the new host first. Otherwise email stops arriving.
If your domain is .np or .com.np: nameserver changes for .np domains go through register.com.np and can take longer than for a .com. Changing the A record at your current DNS provider is usually much faster. If you must change nameservers, request it well before your planned move day.
Step 6: Turn on SSL and check everything
Once the domain points to the new server, set up your SSL certificate so the site loads over https://. On cPanel hosts, AutoSSL usually issues one automatically within an hour or so of the DNS change. Then:
Load the site on your phone using mobile data. That shows what the public sees.
If the browser warns that the page is "not fully secure", some images or scripts still use
http://. A search-and-replace plugin such as Better Search Replace can fix the old URLs.Clear any cache plugin and your CDN cache.
Send yourself a test email from a contact form.
Step 7: Keep the old hosting for a week
Don't cancel the old hosting the same day. Leave it running for about seven days while DNS finishes spreading everywhere. In that time, check that email works and confirm that new orders and comments are reaching the new site. Then cancel.
Special notes for Nepali sites
eSewa, Khalti and other payment gateways: if your domain stays the same, payment callbacks usually keep working. If a gateway restricts access by server IP, give them your new server's IP before you switch. Then run one real low-value payment to test.
Where your server is matters for speed. If most of your visitors are in Nepal, a server in or near Nepal cuts the delay on every page load. If your visitors are mostly abroad, choose a server close to them.
Paying in rupees: moving to a host that takes eSewa, Khalti, Fonepay or bank transfer means no more card limits or currency conversion fees at renewal time.
Common problems and fixes
Problem | Likely cause | Fix |
|---|---|---|
"Error establishing a database connection" | Wrong details in | Check the database name, user, password and host |
Pages show 404, home page works | Permalinks need resetting | Settings → Permalinks → Save |
White screen | Plugin or PHP version conflict | Switch to the same PHP version you had; disable plugins one by one |
Images missing | Uploads folder not copied fully | Re-upload |
Email stopped | MX records lost when nameservers changed | Add the MX records back at your new DNS host |
"Not secure" warning | SSL not issued yet, or | Wait for AutoSSL, then replace old URLs |
- wordpress
- migration
- free wordpress migration in nepal
- baddas cloud
- wordpress hosting in nepal
- best wordpress hosting in nepal
Frequently asked questions
How long does a WordPress migration take?
Copying a small or medium site usually takes under an hour. The DNS change then spreads over minutes to a day, depending on your TTL. Following the steps above, your site stays online the whole time.
Will I lose my Google rankings if I change hosts?
No, as long as the domain, URLs and content stay the same. Google cares about your pages, not which company hosts them. A faster server can even help.
Will my email stop working?
Not if you plan for it. If you only change the A record, email is untouched. If you change nameservers, copy your MX and email TXT records to the new DNS first.
Do I need to move my domain to the new host as well?
No. Your domain can stay with its current registrar. You only change where it points. You can transfer the domain later if you want everything in one place.
Can someone do this for me?
Yes. Many hosts migrate sites for free, and so do we.
