Moving a WordPress Site to a New Host? Build the Rollback Plan First

5tLt...ntrC
16 Nov 2026
5

Most people decide to switch hosts on a bad day. The site was slow again, support took two days to answer, or the renewal invoice came in at twice the intro price. By the time the decision is made, the urge is to get it over with: buy the new plan, run a migration plugin, point the domain, done.
That works more often than it should. When it doesn't, the trouble rarely shows up during the move itself. It shows up two days later, when contact form emails have quietly stopped arriving, or a week later, when someone notices that the shop's order confirmations are going nowhere. This article is about the part of a host migration that gets the least attention and decides how much a mistake costs you: knowing exactly how you will get back to a working site if something goes wrong.

Why most migration advice starts in the wrong place

Search for "how to migrate WordPress" and nearly every guide opens with the copy step. Install this plugin, export this file, upload it there. The copy step matters, but it is also the most automated and best-documented part of the job. Plugins, hosts and command-line tools have been doing it for years.
What those guides tend to skip is everything around the copy. A WordPress site is rarely just WordPress. It sends mail through the host's server, it has DNS records that other services depend on, it may run scheduled jobs from the host's control panel, and it may have paths or credentials baked into its config file. Copy the WordPress part perfectly and you can still break three things that live next to it.
So flip the order. Before you copy a single file, answer one question in writing: if the new host fails on launch day, what do I do in the next 15 minutes, and what do I need to have ready to do it?

Step zero: decide what "rolled back" means for your site

A rollback plan has two parts. There is the snapshot of the site as it stood before you touched anything, and there is the old hosting account itself, still running and still able to serve traffic. You want both. People often count on one and forget the other.

The snapshot that actually lets you go back

The obvious next question is what that snapshot needs to contain. Is a plugin export enough? Is the host's own nightly copy enough? The short version: you need the site's files and its database, captured at the same moment, kept somewhere other than either host, and checked so you know they open. If you want the full reasoning behind that standard, this plain-English guide on what a WordPress backup actually is covers why both halves matter and what makes a copy restorable rather than just present.
For a migration, a few extra details are worth adding to that baseline:
· Take it after the content freeze starts, not before. A snapshot from Monday is not much use if your editors published four posts on Tuesday. More on freeze windows below.
· Write down the WordPress, PHP and MySQL or MariaDB versions on the old host. If you ever restore this snapshot, you want to restore it onto something that matches, at least for the first attempt.
· Save a copy of wp-config.php and any .htaccess or server config separately. They are in the files, but having them as standalone files makes comparing old and new much faster.
· Open the database export and look at the end of it. A complete mysqldump file normally finishes with a "Dump completed" comment. If the file stops halfway through an INSERT statement, the export was cut off and you do not have a backup yet.

Where the snapshot should live

Not on the old host, and not only on the new one. The whole point of a migration snapshot is to survive the scenario where one account is unusable and the other is broken. Your own computer, a cloud storage bucket, or a separate backup service all work. What matters is that you can reach it with neither hosting account involved.
The second half of the rollback plan is simpler and more often ignored: do not cancel the old hosting account until well after the move. Keep it paid for at least one full billing cycle past cutover if you can. The old server, untouched, is the fastest rollback you will ever have. Switching the DNS back takes minutes. Restoring from a snapshot onto fresh hosting takes much longer.

Map everything the site touches besides WordPress

This is the inventory step, and it is where most painful migrations go wrong. Sit down with the old host's control panel and your domain registrar open side by side and list everything that is not part of the WordPress install.

DNS records beyond the A record

When people say "point the domain to the new host", they usually mean changing the A record (and AAAA, if IPv6 is in use) for the root domain and www. But your DNS zone likely holds more than that. Export or screenshot the whole zone before you change anything. Look for:
· MX records, which control where email for your domain is delivered.
· TXT records for SPF, DKIM and DMARC, which decide whether your outgoing email is trusted, plus verification strings for services like Google Search Console.
· CNAME records for subdomains pointing at third-party tools: a help desk, a mailing list service, a landing page builder, a status page.
· Subdomains with their own A records, such as staging. or shop., that may live on the old host too.
Here is the trap. If your nameservers currently sit with the old host, and you switch nameservers to the new host or to a DNS provider, the whole zone is replaced. Anything you did not recreate on the new side simply stops existing. Email is usually the first casualty, because MX records are easy to forget when you are focused on the website.

Email

Ask two separate questions. Where does mail for your domain get received? And where does WordPress send its own mail from?
If your mailboxes live on the old host, moving the website does not move them. You either keep the old host running for email, move mail to a dedicated provider, or set up mailboxes on the new host and migrate the messages. Decide this before cutover, not after the first person complains that their inbox has gone quiet.
WordPress's outgoing mail is a separate issue. Many shared hosts let PHP's mail() function send through the local server with little setup. A new host may block it, throttle it, or send it from an IP with no reputation. Password resets, form notifications and store receipts all ride on this. If the site uses an SMTP plugin, note its settings and check whether the credentials are tied to the old host. If it does not, the move is a good time to start using one with a proper transactional mail service and the matching SPF and DKIM records.

Scheduled jobs and integrations

Look at the old host's cron jobs list. Some sites disable WordPress's built-in WP-Cron (by setting DISABLE_WP_CRON to true in wp-config.php) and replace it with a real server cron job. That job does not come with a plugin migration. If you miss it, scheduled posts stop publishing and scheduled tasks stop running, and nothing throws an error.
Also list anything outside the site that talks to it: payment gateway webhooks, a CRM pulling form entries, an uptime monitor, a CDN with the old server's IP set as its origin. Anything configured with an IP address instead of a hostname will need updating.

Things hard-coded in wp-config.php

Open wp-config.php and read it line by line. Database name, user, password and host will change; you know that. Look also for WP_HOME and WP_SITEURL constants, custom WP_CONTENT_DIR paths, absolute file paths that include the old host's home directory, cache plugin constants, and any API keys a developer chose to store there. Each one is a line that can point the new site back at the old server without telling you.

Lower your DNS TTL days ahead

Every DNS record carries a TTL, or time to live, in seconds. It tells resolvers around the internet how long they may cache the answer before asking again. Many registrars and hosts default to an hour or more, and some records sit at a day.
That number decides how fast your rollback works. If your A record has a TTL of 86,400 seconds (24 hours) and you switch it to the new host, some visitors may keep seeing the old server for up to a day. Worse, if you need to switch back, some will keep seeing the broken new one for just as long.
The fix costs nothing. A few days before the move, lower the TTL on the records you plan to change to something short, such as 300 seconds. Then wait at least as long as the old TTL so caches holding the long value expire. On cutover day, changes now spread in minutes rather than hours, and so does a reversal. Once the new host has been stable for a while, raise the TTL again.
One caveat: some resolvers do not respect very low TTLs exactly, and a nameserver change follows different, slower rules than editing a single record. If you can, keep your nameservers where they are for the move and change only the A records. That keeps the variables to a minimum.

Pick a content freeze window

A WordPress site is a moving target. Comments arrive, orders come in, users register, editors fix typos. Between the moment you export the database and the moment DNS points at the new host, anything written to the old site is written to a database you are about to abandon.
For a brochure site that changes once a month, this barely matters. For a blog with several authors, a membership site or a store, it matters a lot. Pick a window and tell everyone involved:
· No new posts, page edits or plugin changes from the start of the window until the new host is confirmed working.
· For a store, choose the quietest period you can find in your own order data, and consider a short maintenance notice.
· Close comments or registrations for the window if the site takes many of them.
If a full freeze is not possible, accept that you will need to reconcile. Note the time of your database export, and after cutover, compare new orders, users or comments on the old site against the new one. WooCommerce stores in particular deserve care here, because a missed order is a real customer who paid and is waiting.

Build the new copy without touching the old one

Now you copy. The rule for this phase is that nothing you do should change the live site. The old server keeps serving visitors exactly as before while you build the new one quietly in the background.

Files

Copy the whole WordPress directory, not just wp-content. Core files can be re-downloaded, but copying everything means hidden files like .htaccess, .user.ini or a custom php.ini come along too. Large uploads folders move far more reliably over SFTP or rsync than through a browser upload, and rsync can be run a second time after the freeze to pick up anything that changed.
After copying, compare counts. The number of files and the total size of wp-content/uploads on both sides should match closely. A gap of a few files is worth chasing before launch, because missing images do not throw errors. They just show up as broken pictures that a visitor notices first.

Database export and import

For anything beyond a small site, export with tools built for the job. WP-CLI's wp db export or a direct mysqldump with the --single-transaction flag gives you a consistent copy of InnoDB tables even while the site is live. Set the character set on the export explicitly so emoji and curly quotes survive the trip, and import on the new host with the same setting.
Watch the table prefix. If the old site used something other than the default wp_, the $table_prefix line in the new wp-config.php must match exactly, or WordPress will act as if it has never been installed.

Changing the URL safely

If the domain stays the same, you may not need to change any URLs in the database at all. That is one of the quiet advantages of a straight host-to-host move. But many migrations add a change on the way: http to https, a www switch, or building the new copy on a temporary domain first. Any of those means rewriting URLs stored in the database.
This is where an innocent-looking step can do real damage. A lot of WordPress data, including widget settings, page builder layouts and theme options, is stored as serialized PHP strings that record the length of every value. A plain text find-and-replace changes the value but not the recorded length, and PHP then refuses to read the row. BackupYourSite's write-up on why serialized data breaks during a WordPress migration shows the byte-length problem with a worked example and lists the tools that handle it correctly.
The practical rule is short. Never run a raw SQL REPLACE() or a text editor's find-and-replace on a WordPress database dump. Use a tool that understands serialization, such as WP-CLI's wp search-replace, and run it with --dry-run first so you can see how many rows in each table it plans to change before it writes anything. If the counts look wildly off from what you expect, stop and work out why before you run it for real.

Test on the new host before the world sees it

The new copy is built. DNS still points at the old server. This is the most valuable stage of the whole project, and the one most often rushed, because the site "looks fine" on a first click.

Preview it on your real domain using a hosts file

Temporary preview URLs some hosts provide can be useful, but they change the domain, and that changes behaviour: cookies, redirects, absolute links and some licence checks all react to it. A cleaner method is to edit the hosts file on your own computer so that your domain resolves to the new server's IP for you alone. On Windows it lives at C:\Windows\System32\drivers\etc\hosts; on macOS and Linux it is /etc/hosts. Add a line with the new IP followed by your domain and the www version.
Now your browser loads the new server under the real domain, while every other visitor still reaches the old one. You will need an SSL certificate on the new host for https to load cleanly; many hosts let you upload or issue one in advance, and if they can only issue one after DNS points at them, expect a browser warning during testing and plan to issue it right at cutover.
Remember to remove the hosts file line when you finish. Forgetting it is a classic way to spend an hour later convinced that DNS has not updated.

What to click through

Test the things that make the site useful, not just the homepage. A reasonable list for most sites:
· Log in to the admin. Check that the dashboard loads and that saving a draft works.
· Open a handful of posts and pages built with different templates or page builder layouts. Look for empty widget areas and missing sections.
· Submit every form on the site and confirm the notification email arrives, and that it does not land in spam.
· For a store: add to cart, go through checkout in test mode if your gateway supports it, and confirm the order email.
· Check permalinks by opening a post from its pretty URL. A 404 here usually means the rewrite rules or .htaccess did not carry over.
· Look at the media library and a few older posts with images.
· Check that the site's search, any membership logins and any caching or security plugins behave the same as on the old host.
Compare against the old site in a second browser profile without the hosts entry. Side by side, differences jump out that you would never spot from memory.

Cutover day

If the previous steps were done properly, cutover is an anticlimax, which is exactly what you want. A simple sequence:
1. Start the freeze. Put the old site into maintenance mode if it takes orders or user content.
2. Take the final snapshot of the old site, files and database together, and store it off both hosts.
3. Run a final rsync of uploads and a fresh database export and import, so the new host has everything up to the freeze.
4. Run your URL search-replace on the new database, if you need one, with a dry run first.
5. Repeat a short version of your test list through the hosts file.
6. Change the A records. Leave everything else in the zone as it was, unless email is moving too.
7. Issue or confirm the SSL certificate on the new host.
8. Remove your hosts file entry and test again from a normal connection, and from a phone on mobile data, which uses a different resolver.
9. Lift the freeze once you are confident the new host is serving real traffic correctly.
Two small habits help a lot. Keep a running log with timestamps of what you did and when, because if something breaks later, "when did we change the A record" is the first question. And put a tiny marker on each server, such as an HTML comment or a test file with different content, so you can tell at a glance which host is answering.

The first 72 hours

The site is live on the new host. This is not the end of the project. Problems that are invisible on launch day tend to surface over the next few days, once real traffic, real orders and scheduled jobs start exercising the site.
Things to watch:
· Email. Send yourself a password reset and a form submission each day. Ask anyone who handles customer mail whether volumes look normal.
· Scheduled posts and cron tasks. Schedule a test post for a few hours ahead and make sure it publishes on time.
· Error logs. Check the PHP error log on the new host. A new PHP version can surface warnings from an old plugin that the previous host never showed.
· Search Console. Look for spikes in crawl errors or server errors. A sudden wave of 5xx errors points to a resource limit on the new plan.
· Traffic to the old server. Check the old host's access logs. Once real visitor traffic there falls to almost nothing, DNS has spread properly.
· Character encoding. Skim recent posts and product titles for odd symbols where apostrophes or emoji used to be. Charset problems often go unnoticed for days.
Keep the freeze-time snapshot and the old hosting account untouched through this whole period. They are still your way back.

When to actually roll back

The hardest part of a rollback is not the mechanics. It is deciding to do it. On launch day, every problem feels like it is one fix away, and an hour of "one more fix" can turn into an evening with a broken live site.
Set your rules before cutover, while you are calm. They will differ by site, but here is a reasonable starting set:
· Roll back immediately if the site is down or showing errors to visitors and you cannot name the cause within a short, fixed time limit you set in advance, such as 15 or 30 minutes.
· Roll back immediately if checkout or payments fail on a store, or if logins fail on a membership site. Revenue and access come before investigating.
· Fix forward if the problem is cosmetic, limited to one page or feature, and the core site works. A broken widget is annoying but rarely worth reversing a move.
· Fix forward with a deadline for problems like email delivery, where a workaround exists. If it is not solved by the deadline, roll back and try again later.
Because you kept the old host running and lowered your TTL, rolling back is mostly one step: point the A records back at the old server. The only real complication is any content created on the new host since cutover. If the freeze was still in place, there is none. If it was lifted, note what was added so you can carry it over, by hand or with an export, when you try the move again.
A rollback is not a failure. It is the plan working. You get a calm second attempt with everything you just learned, instead of an all-nighter on a live site.

Shutting down the old host

Do not rush this. Before you cancel, make sure all of the following are true:
· The new host has run without serious problems through at least one full cycle of your site's busiest pattern, whether that is a weekly newsletter, a monthly billing run or a weekend sales peak.
· Email, if it lived on the old host, has been moved and confirmed, including old messages people still need.
· You have a fresh backup of the new site, taken on the new host, stored offsite, and tested by restoring it somewhere. Your migration snapshot shows the past. You now need a backup routine for the present.
· You have downloaded anything else from the old account you might want: old logs, cron job definitions, server config files, and any site you forgot was also hosted there.
· Your DNS TTLs are back to normal values.
That third point is easy to miss. During a migration, people put so much care into the one-off snapshot that they forget the new host needs its own scheduled, offsite backups from day one. Whatever system the old host had, assume it did not come with you.

Bringing it together

A host migration is mostly a copy job, and copy jobs are well solved. What makes one go badly is everything around the copy: the email records nobody wrote down, the cron job that lived in a control panel, the database URL change done with the wrong tool, and above all the lack of a quick way back when something unexpected happens.
If you take one thing from this article, let it be the order of work. Plan the rollback first: a complete, verified snapshot stored away from both hosts, the old account left running, and DNS TTLs lowered in advance. Then map what the site depends on, freeze content, build and test the new copy in private, and cut over with clear rules for when to reverse. Done that way, the worst case on launch day is a short, boring switch back to the old server, followed by a second try a few days later. That is a far better worst case than the one most site owners sign up for when they move hosts in a hurry.

BULB: The Future of Social Media in Web3

Learn more

Enjoy this blog? Subscribe to Anita Rawat

0 Comments