How to Move a WordPress Site to a New Host Without Downtime
Moving a WordPress site to a new host sounds risky, and done carelessly it is. People copy files, flip DNS, and then spend a day staring at “Error establishing a database connection” while customers hit a blank page. Lost orders, broken images, and a temporary drop in search traffic are the usual damage. The good…

Move WordPress Site New Host
Moving a WordPress site to a new host sounds risky, and done carelessly it is. People copy files, flip DNS, and then spend a day staring at “Error establishing a database connection” while customers hit a blank page. Lost orders, broken images, and a temporary drop in search traffic are the usual damage.
The good news is that a zero-downtime move is mostly about order of operations. If the new copy is fully working and tested before any visitor is sent to it, nobody notices the switch.
Now in this article, I will show how to move a WordPress site to a new host without downtime, using either a migration plugin or the manual method, and how to test everything before you change DNS.
Quick answer: Take a full backup, lower your DNS TTL a day or two ahead, copy files and the database to the new host (with a plugin or manually), update wp-config.php, then preview the new server through your hosts file. Once everything checks out, point DNS to the new host, set up SSL, and keep the old host running for a few days.
Getting Started
Before you touch anything, gather:
- Admin access to both hosts (control panel, SFTP or SSH, and phpMyAdmin or similar).
- Login to your DNS provider, which may be your registrar, your old host, or Cloudflare.
- A full backup of files and database stored off the old server.
- The new host’s IP address and an empty database with its name, user, and password.
Cost is usually just your new hosting plan. Many managed WordPress hosts offer to migrate sites for you, so check that first; it can save an evening.
Step 1: Lower Your DNS TTL
TTL (time to live) controls how long resolvers cache your DNS records. Many records sit at an hour or longer. One to two days before the move, edit your domain’s A record (and the www record) and set the TTL to something short, like 300 seconds. When you switch later, most visitors will pick up the new IP within minutes instead of hours.
Step 2: Copy the Site
Option A: Use a migration plugin
This suits most small sites. UpdraftPlus, Duplicator, All-in-One WP Migration, and Migrate Guru all package files and database and handle URL replacement. UpdraftPlus’s free version, for example, includes migration with a built-in search-and-replace tool. Install WordPress on the new host, install the same plugin, and restore the package there. Watch for upload size limits on large sites, which some plugins only lift in paid versions.
Option B: Move it manually
Better for large sites or if you want full control.
- Export the database from phpMyAdmin or with
wp db exportover SSH. - Download all files in the WordPress folder, including wp-content and hidden files like .htaccess.
- Upload the files to the new host’s web root.
- Import the database into the new empty database.
- Edit wp-config.php with the new DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST values.
- Run a search-replace only if the domain changes. Use a serialization-safe tool such as WP-CLI’s search-replace command, never a plain text find-and-replace on the SQL file.
The official Migrating WordPress guide warns that plain replacements can break serialized data and that you should never change the GUID column. Its WP-CLI example skips that column with --skip-columns=guid.

Step 3: Test Through Your Hosts File
This is the step that prevents downtime. Your computer’s hosts file lets you send only your own browser to the new server while everyone else still sees the old one.
- Open the hosts file as administrator:
C:\Windows\System32\drivers\etc\hostson Windows or/etc/hostson Mac. - Add a line with the new IP followed by your domain, and another for www.
- Flush your DNS cache, then open your site in a private window.
- Click through key pages, log in to wp-admin, submit a contact form, and run a test checkout if you sell online.
- Remove those lines when you’re done.

Screenshot: Migrating WordPress page on developer.wordpress.org, captured by TheTechHacker.
Step 4: Switch DNS and Set Up SSL
- Freeze content changes. Pause posting and, on a store, schedule the switch for a quiet hour so no orders land on the old server.
- Re-sync if needed. If anything changed since your copy, export the database again and import it on the new host.
- Update the A records to the new IP.
- Issue the SSL certificate. Most hosts offer free Let’s Encrypt certificates, which usually need DNS to point at the new server first. Some hosts can issue one before the switch through DNS validation.
- Raise the TTL back to its usual value after a day.
- Keep the old hosting active for at least a few days as a fallback before canceling.
Troubleshooting
- “Error establishing a database connection”: a wrong value in wp-config.php. DB_HOST isn’t always localhost; check your host’s docs.
- Redirects back to the old site or a temporary URL: the siteurl and home options in wp_options are wrong. Fix them with
wp option update homeandwp option update siteurl. - Broken links or 404s on inner pages: go to Settings, then Permalinks, and click Save to rebuild rewrite rules.
- Mixed content warnings: some images still load over http. Run a search-replace from http:// to https:// for your domain.
- Email stopped working: you may have overwritten MX records when changing DNS. Only edit the A records.
- Caching plugins misbehaving: clear plugin, server, and CDN caches after the switch.
Still choosing where to move? Compare the best managed WordPress hosting and the best web hosting for small business websites. If you’re moving DNS too, our domain registrar comparison helps, and for a wider safety net read how to back up your business data.
That’s all for now. Please do share your views and feedback in the comment box below.
FAQs
How long does a WordPress migration take?
A small site can be copied in under an hour. Allow a day or two around it for the TTL change and testing.
Will moving hosts hurt my SEO?
Not if the domain and URLs stay the same and the site stays online. Problems come from downtime or broken URLs.
Do I need to change nameservers?
No. Changing only the A records keeps your email and other DNS settings where they are.
When can I cancel my old host?
After traffic and orders are clearly hitting the new server and you have a fresh backup, usually a few days to a week later.
Featured image: WordPress.org.
Disclosure: TheTechHacker has no paid relationship with WordPress.org, UpdraftPlus, Duplicator, All-in-One WP Migration, Migrate Guru, or Let’s Encrypt, and this post has no affiliate links.
More in How-to

How to Check If Your WordPress Site Is Infected With Gootloader (FBI Checklist)
On November 16, 2026, the FBI warned that Gootloader, a malware operation active since 2020, has taken over more than 1,000 WordPress sites. It uses them to push fake legal documents to the top of Google, and the FBI links it to over $28 million in ransomware payments. If you run a WordPress site, your…

How to Buy a Domain Name and Connect It to Your Website
Buying a domain looks like a five-minute job: search a name, pay a few dollars, done. Then the second-year renewal bill arrives at several times the price, the site shows a “Not secure” warning, or the email you set up stops working because someone changed the wrong DNS record. A domain is the one piece…

WordPress Is Installed What Next
All major hosting providers offer WordPress, it is easy simple to use and most famous CMS in the world. We already posted a article about installing WordPress in Windows in simple steps. After lot of testing in private environment it is time to launch site to public. WordPress Is Installed Next: All major hosting services…
The week in tech, minus the noise.
New reviews, fixes and the stories that matter — once a week, straight to your inbox.
We only use your email to send the newsletter. Unsubscribe any time. See our privacy policy.

Comments