To migrate a WordPress site with zero downtime, copy the files and database to the new host while the old one stays live, test the copy using your computer’s hosts file, then switch DNS after lowering its TTL. A final sync just before the switch makes sure no orders, comments or sign-ups are lost.
Guide current as of 8 October 2026. Commands use WP-CLI, WordPress’s official command-line tool; every step also has a no-command-line equivalent.
Key takeaways
- Lower your DNS TTL to 300 seconds 24–48 hours before the switch: that is what makes the change near-instant for visitors.
- Never shut down the old host until the very end: both servers run side by side throughout.
- Test the site on the new server before touching DNS, by editing your computer’s hosts file.
- For an active site (store, forum), run a final database sync right before switching.
- Keep the same URL: no search-and-replace needed and no SEO impact.
- Rather hand it over? Hosterwise’s free migration follows this exact method for you.
What does a zero-downtime WordPress migration mean?
It is a move to a new host during which the site stays reachable the whole time: the old server keeps answering until DNS points to the new one, which has been fully prepared and tested in advance. Visitors never see an error page or a half-copied site.
A WordPress migration comes down to three things: the files (WordPress core, the wp-content folder with themes, plugins and media, and wp-config.php), the database (content, settings, orders, users) and DNS, which tells the world which server answers for your domain. Downtime almost always comes from doing things in the wrong order: DNS changed before the new site is ready, the old hosting cancelled too early, or e-mail forgotten.
This guide assumes you are keeping the same domain name. If the address changes too, you will also need to replace URLs in the database and set up 301 redirects; we flag this along the way.
What should you prepare before migrating?
Take stock of the current setup, make a full backup and gather every login: old host, new host and the domain’s DNS provider. Also note where your e-mail is hosted: it is the most common oversight, and the most painful.
Before you start, check:
- Versions: WordPress, PHP and MySQL/MariaDB on the old server. On the new one, pick a PHP version at least as recent (WordPress recommends PHP 8.3 or later).
- Site size: the weight of
wp-content/uploadsand of the database. It decides which method fits best. - Access: SFTP or SSH, phpMyAdmin or database access, registrar or DNS provider account.
- E-mail: if your mailboxes are at the old host, you will need to recreate them elsewhere and move their content, or keep the MX records pointing to the old service.
- Extras: server cron jobs, CDN, web application firewall, SMTP plugin, API keys tied to the server’s IP address.
- Timing: pick a low-traffic window for the switch, especially for a store.
Finally, take a full backup and make sure you know how to restore it. This is not a theoretical precaution: it is your plan B if anything goes wrong.
Step 1: why lower the DNS TTL before migrating?
TTL (“time to live”) tells DNS resolvers how long to cache an answer. With a 24-hour TTL, some visitors would keep reaching the old server for up to a day after the change. Dropping it to 300 seconds at least 24–48 hours ahead means the switch spreads within minutes.
In your DNS provider’s dashboard, change the TTL of the records that will move: usually the domain’s A record (and AAAA if present) and the one for www. Then wait at least as long as the old TTL so the previous values expire everywhere.
You can check the published value with dig (macOS, Linux):
dig +noall +answer example.com A
# example.com. 300 IN A 192.0.2.10
# ^ TTL in secondsOne special case: if the migration involves changing the domain’s nameservers (NS), timing also depends on the domain registry and is harder to shorten. Whenever you can, keep your current DNS provider and only edit the A records.
Step 2, manual method: how do you copy WordPress by hand?
The manual method means exporting the database, archiving the files, transferring everything, importing the database on the new server and updating wp-config.php. It works for sites of any size and relies on no plugin, but you need FTP or SFTP access to the files and access to the database; SSH speeds things up where the host provides it.
The process is described in the official “Moving WordPress” documentation. Here is the WP-CLI version, for when both hosts give you SSH access. Hosterwise does not provide SSH, as a security choice: the no-command-line route is described right after the commands.
- Export the database on the old server:
cd /path/to/wordpress
wp db export ~/migration/site.sql- Archive the files (core,
wp-contentandwp-config.php):
tar -czf ~/migration/site-files.tar.gz -C /path/to/wordpress .- Transfer the archives to the new server, over SFTP or server to server:
rsync -avz ~/migration/ user@new-server:~/migration/- Create an empty database and its user on the new host (from the control panel), then extract the files into the site’s root folder.
- Update
wp-config.phpwith the new database credentials:
define( 'DB_NAME', 'new_database' );
define( 'DB_USER', 'new_user' );
define( 'DB_PASSWORD', 'a-strong-password' );
define( 'DB_HOST', 'localhost' );- Import the database:
wp db import ~/migration/site.sql- Only if the site address changes, replace the old URL in the database. Always do a dry run first; the search-replace command handles serialised data correctly, unlike a plain SQL replace:
wp search-replace 'https://old-domain.com' 'https://new-domain.com' --skip-columns=guid --dry-run
wp search-replace 'https://old-domain.com' 'https://new-domain.com' --skip-columns=guidNo SSH access? The same logic applies with graphical tools: export the database in phpMyAdmin, download the files with an FTP or SFTP client such as FileZilla, then import and upload them on the new server.
That is the case at Hosterwise: SSH access is not offered, a security choice that reduces the servers’ attack surface. The simplest route is to let our team handle the transfer through the free migration. If you would rather do it yourself, create the database under Databases & FTP in CyberPanel and import your .sql file with phpMyAdmin, then upload the files with CyberPanel’s File Manager or an FTP account created in the same section. If the site’s address changes, our 24/7 support runs the wp search-replace for you.
Step 2, plugin method: how do you migrate WordPress with a plugin?
A migration plugin builds a complete archive of the site (files and database) on the old host, then restores it onto a fresh WordPress install at the new host. It is the most approachable method, but large sites often run into hosts’ upload size limits.
The most widely used plugins:
- Duplicator: builds a “package” (archive plus installer script) that you drop onto the new server.
- All-in-One WP Migration: exports and imports a single file from the admin. Its official page notes that import size depends on your host’s upload limit, which a paid extension works around.
- UpdraftPlus: back up the source site, install WordPress and UpdraftPlus on the new host, upload the archives and restore them.
- Migrate Guru: server-to-server copy without going through your computer, handy for large sites.
Whichever plugin you use, temporarily deactivate caching and security plugins before exporting, and after importing check that you can log in with your usual credentials: restoring replaces the database, so the temporary WordPress accounts are gone.
| Criterion | Manual method | Migration plugin | Hosterwise free migration |
|---|---|---|---|
| Skills needed | FTP or SFTP, databases; SSH helpful where available | WordPress admin | None |
| Large sites (several GB) | Well suited | Upload limits possible | Handled by our team |
| Control over each step | Full | Partial | You sign off before the switch |
| Cost | Free, your time | Free or paid add-on | Free |
Step 3: how do you test the site on the new server before changing DNS?
Edit your computer’s hosts file so your domain points to the new server’s IP address: only you see the migrated site, at its real address, while everyone else keeps using the old one. Test every key page, then remove the line you added.
The hosts file lives here:
- macOS and Linux:
/etc/hosts(edit with admin rights, for examplesudo nano /etc/hosts); - Windows:
C:\Windows\System32\drivers\etc\hosts(open Notepad as administrator).
Add one line with the new server’s IP, provided by your new host:
# Migration test: remove after the DNS switch
192.0.2.10 example.com www.example.comThen flush your computer’s DNS cache (sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder on macOS, ipconfig /flushdns on Windows) and restart the browser. Without touching the hosts file, curl can also test a specific page:
curl -sI --resolve example.com:443:192.0.2.10 https://example.com/ | head -n 5The new server’s SSL certificate may not be issued yet: free Let’s Encrypt certificates are often validated through an HTTP request to the domain, which requires DNS to already point to the server. A certificate warning during testing is therefore normal and goes away after the switch.
Your checklist:
- home page, posts, pages, categories and search;
- images and media (no broken images);
- admin login and saving a draft;
- contact forms and transactional e-mails;
- for WooCommerce: cart, a test-mode order, the customer account area;
- permalinks: if you get 404 errors, re-save them under Settings > Permalinks.
Step 4: how do you run the final sync and switch DNS?
If the site has changed since the copy (orders, comments, new posts), put the old site in maintenance mode for a few minutes, re-export the database and any new media, import them on the new server, then update the DNS record. For a brochure site that has not changed, simply switch DNS.
For an active site, if both servers give you SSH access, the whole sequence fits in a few commands:
# 1. Old server: maintenance mode, then export the up-to-date database
wp maintenance-mode activate
wp db export ~/migration/site-final.sql
# 2. Send the database and only the media added since the first copy
rsync -avz ~/migration/site-final.sql user@new-server:~/migration/
rsync -avz --update wp-content/uploads/ user@new-server:/path/to/wordpress/wp-content/uploads/
# 3. New server: import, then clear caches
wp db import ~/migration/site-final.sql
wp cache flush # object cache
wp litespeed-purge all # page cache, if LiteSpeed Cache is installedAt Hosterwise, without SSH, the final sync follows the same steps with graphical tools: re-export the old site’s database, import it with phpMyAdmin, upload any new media over FTP, then purge the cache from the LiteSpeed Cache menu in the WordPress dashboard. With the free migration, our team does this at the agreed time.
Next, in your DNS provider, replace the IP address of the A record (and AAAA) with the new server’s. Thanks to the lowered TTL, most visitors land on the new server within minutes. Once the new site is confirmed live, turn maintenance off on the old one (wp maintenance-mode deactivate): it now only gets a few stragglers.
For a store, keep an eye on the old server for a few hours: any order placed there after the final export would need to be re-entered by hand. That is why you pick a quiet time slot.
What should you check after the migration?
Make sure the SSL certificate is issued and the site forces HTTPS, raise the DNS TTL back to a normal value, watch for errors in Search Console and keep the old hosting active for at least a week. It is also a good moment to enable the new host’s server-side cache.
- SSL: issue or check the certificate, then confirm
http://redirects tohttps://. - TTL: set it back to a usual value (for example 3,600 seconds) once the migration is validated.
- SEO: if URLs have not changed, Google needs nothing special, as its guide to moving a site without URL changes explains; just watch crawl errors in Search Console.
- E-mail: send and receive a test message from every address.
- Scheduled tasks: recreate server cron jobs if the old host used them.
- Performance: on a LiteSpeed server, follow our LiteSpeed Cache setup guide, then measure the gain with our 15 ways to speed up WordPress.
- Old hosting: keep it for one to two weeks, with a final backup downloaded, before cancelling.
How long does a WordPress migration take?
For a typical brochure site or blog, the technical part (copy, import, tests) usually takes a few hours. Add 24–48 hours of lead time for the TTL change, then a few minutes of propagation at switch time. Large stores need more preparation.
What makes a migration longer: a multi-gigabyte database, hundreds of thousands of media files, mailboxes to move, a domain change or plugins that store absolute paths to the old server. What makes it shorter: SSH access on both sides where both hosts provide it (when moving to Hosterwise, which does not offer SSH, the quickest option is to let our team handle the transfer) and a site cleared of unused plugins before the transfer.
Let us do it: Hosterwise’s free migration
If you would rather not handle these steps yourself, Hosterwise migrates your WordPress site to our LiteSpeed Enterprise servers for free. You give us access to your old hosting (or a full backup), we prepare the copy, you check it, and the DNS switch happens at the agreed time, following the same zero-downtime approach as this guide.
The service is included in every plan, from Starter to Boost, on top of the 30-day money-back guarantee. Full details are on our free WordPress migration page; to pick the right plan for your site, see pricing. If your domain is registered elsewhere, you can leave it with its current registrar or transfer it to Hosterwise. And if you are still comparing hosts, our honest WordPress hosting comparison will help you decide.
WordPress migration FAQ
Can I migrate a WordPress site without losing SEO?
Yes, as long as URLs stay the same and the site has no outage. Rankings are tied to page addresses and content, not to the host. If the domain changes, you also need page-by-page 301 redirects and a change-of-address notice in Search Console.
Do I need to reinstall WordPress on the new host?
With the manual method, no: you copy the whole installation. With a plugin such as All-in-One WP Migration or UpdraftPlus, yes: you install a blank WordPress, add the plugin, then import the archive, which replaces everything.
How long does DNS propagation take?
It depends on the TTL set before the change. With a 300-second TTL in place 24–48 hours beforehand, most visitors switch over within minutes. Changing nameservers (NS) can take longer, because it also depends on the domain registry.
What happens to my e-mail during the migration?
E-mail follows the MX records, not the site’s A record. If your mailboxes are at the old host, leave the MX records unchanged until the mailboxes have been recreated and their content moved elsewhere. Do not cancel the old service before then.
Should I put the site in maintenance mode during the migration?
Only for a few minutes, during the final sync of an active site (store, forum, membership site). For a brochure site that has not changed since the copy, no maintenance is needed: you just switch DNS.
Is the migration to Hosterwise really free?
Yes, migrating a WordPress site is included in every Hosterwise plan. You request it after ordering, we prepare the copy and you approve it before the switch. The 30-day money-back guarantee applies as with any subscription.



