Back to blog
Web Development

How to Move a WordPress Site to a New Hosting Provider Safely

Move your WordPress site to a new host without downtime or lost email. Follow a safe migration sequence covering backups, DNS, testing, SSL, and rollback.

AdminOctober 19, 202610 min read1 views
How to Move a WordPress Site to a New Hosting Provider Safely

How to Move a WordPress Site to a New Hosting Provider Safely

Moving a WordPress site to a new host is routine work for professionals and a source of genuine dread for everyone else, mostly because the failure modes are invisible until visitors hit them. A WordPress migration is the process of copying a site's files and database to a new server, updating configuration, verifying everything works, and then switching the domain's DNS so visitors reach the new server. Done carefully, visitors never notice. Done carelessly, you lose email, break links, or publish a half-working site. This guide shows the safe, sequenced approach I use for client migrations.

Quick Answer: To move WordPress safely, take a full backup, lower your DNS TTL, copy files and database to the new host using a migration plugin or manual export, update wp-config.php, test the site on the new server through your hosts file, recreate email and DNS records, then switch DNS and keep the old hosting active for a week.

When Should You Move WordPress to a New Host?

You should move when your current host is limiting performance, reliability, security, or support in ways configuration cannot fix. Common triggers include consistently slow server response even with caching enabled, frequent downtime, outdated PHP versions with no upgrade path, poor or slow support, missing essentials such as staging environments or automatic backups, and steep renewal prices compared with better alternatives. Before migrating for speed alone, rule out on-site causes with some free WordPress performance tuning, because a heavy theme and oversized images will be just as slow on a new server.

A few terms will come up throughout. DNS, the Domain Name System, maps your domain name to the IP address of the server hosting your site. A DNS record's TTL, or time to live, tells resolvers how long to cache that record before checking again. Lowering the TTL before migration makes the eventual switch propagate faster. Your hosts file is a local file on your computer that can override DNS for your machine only, letting you preview the site on the new server before anyone else sees it.

Also clarify what you are moving. A typical WordPress site consists of the files, including WordPress core, wp-content with themes, plugins, and uploads, plus wp-config.php, and the database containing posts, pages, settings, users, and plugin data. Email is often hosted with the old provider too, which is the part most people forget.

The Safe WordPress Migration Process

The safest migration follows a fixed order that keeps the old site live until the new one is proven. Follow these steps:

  1. Inventory the current setup. Record PHP version, WordPress version, active plugins, cron jobs, SSL setup, and every DNS record, especially MX records for email, plus TXT records for SPF, DKIM, DMARC, and domain verification.
  2. Take a full backup. Download a complete copy of files and database and store it off both servers.
  3. Lower DNS TTL. At your DNS provider, reduce TTL on the main records to a short value a day or two before the move, so the switch propagates quickly.
  4. Prepare the new host. Create the site, set a matching or newer PHP version, create an empty database and user, and note credentials.
  5. Copy the site. Use a migration plugin such as Duplicator, WPvivid, All-in-One WP Migration, or Migrate Guru, or migrate manually by transferring files via SFTP and exporting and importing the database.
  6. Update configuration. Edit wp-config.php with the new database name, user, password, and host if needed.
  7. Handle URL changes. If the domain stays the same, no search and replace is needed. If the domain or protocol changes, use a serialization-safe tool such as WP-CLI's wp search-replace.
  8. Test privately. Edit your hosts file to point the domain at the new server's IP, then browse the site thoroughly.
  9. Recreate DNS and email records. Ensure every needed record exists at the new DNS location before switching.
  10. Freeze content changes. Pause posting, comments, and orders briefly so no data is lost between copy and switch.
  11. Switch DNS. Point the A record, and any AAAA or CNAME records, to the new host.
  12. Issue SSL and verify. Confirm HTTPS works on the new server and monitor for errors.
  13. Keep the old host active. Leave it running for at least a week as a fallback before cancelling.

Migration Methods Compared

Choosing the right migration method depends on site size, technical comfort, and the hosts involved. This comparison reflects common practice across many migrations.

MethodBest forAdvantagesRisks and limits
Host-provided migration serviceOwners wanting a hands-off moveDone by the new host's team, often freeTiming depends on the host; you still must verify and handle DNS and email
Migration pluginSmall to medium sitesPackages files and database together, guided restoreFree versions may impose size limits; large sites can time out
Manual SFTP and database exportLarge sites, developers, problem casesFull control, no size limits, transparent processMore technical; mistakes in config or serialization can break the site
WP-CLI and SSHDevelopers with shell access on both hostsFast, scriptable, reliable search-replaceRequires SSH access and command-line comfort

For most small business sites, a reputable migration plugin or a host migration service works well. Manual migration is the dependable fallback when plugins fail on large media libraries.

What Practitioners Learn From Failed Migrations

This section is practitioner analysis from performing and repairing migrations rather than a formal study. The overwhelming lesson is that migrations rarely fail because files did not copy. They fail at the edges: DNS records that were not recreated, email that stopped working because MX records pointed nowhere, SSL that was not issued in time, hard-coded URLs left in a page builder's data, and orders placed on the old server after the copy was taken.

Email is the most common casualty. Many small businesses receive email through their old hosting account without realizing it. If you move DNS to a new provider without copying MX and related TXT records, email silently stops arriving. Always export a complete list of existing DNS records before making any changes, and confirm where mailboxes actually live.

Serialized data is the most common technical casualty. WordPress and many plugins store settings as serialized PHP arrays, where string lengths are encoded. A naive find-and-replace on a database dump changes string content without updating lengths, which corrupts settings and widgets. Tools such as wp search-replace handle serialization correctly, which is why they are the standard choice when URLs change.

Security is another overlooked edge. A migration copies everything, including malware if the old site was compromised, and leaves behind a stack of old credentials. Changing database and admin passwords after the move, reviewing user accounts, and taking the opportunity to harden the migrated site turns a migration into a security upgrade instead of a risk transfer.

Common Migration Mistakes and How to Avoid Them

These mistakes account for most migration problems. Each has a simple preventive step.

  • Cancelling the old host too early. Keep it active for at least a week. It is your rollback plan and may still hold email or files you forgot.
  • Not lowering TTL in advance. High TTL values mean some visitors continue reaching the old server for longer than expected. Lower TTL ahead of time.
  • Forgetting DNS records. Missing MX, SPF, DKIM, or verification records break email and third-party services. Copy the full record list first.
  • Testing on a temporary URL only. Temporary URLs can cause redirects and mixed content issues that do not reflect production. Use the hosts file method to test on the real domain.
  • Ignoring PHP version differences. A large PHP version jump can break outdated plugins. Match versions initially, then upgrade after the move on staging.
  • Allowing changes during migration. New orders, comments, or posts on the old server after the copy will be lost. Schedule a short content freeze.
  • Skipping post-move checks. Cron jobs, scheduled posts, form emails, and caching can all behave differently on a new server. Test each.

Migration Day Checklist for a Small Business Site

Here is a practical checklist for moving a typical small business site with a contact form, a blog, and email on the old hosting account.

Two days before.

  • Export all DNS records to a document, including MX and TXT records.
  • Confirm where email mailboxes are hosted and plan mailbox migration if needed.
  • Lower TTL on the main A record and related records.
  • Take and download a full backup of files and database.

Migration window.

  • Announce a brief content freeze to anyone who edits the site.
  • Copy the site to the new host with your chosen method.
  • Update wp-config.php credentials and confirm the database connection.
  • Edit your hosts file to point the domain to the new IP and test every page, form, login, and media file.
  • Check permalinks by visiting several posts; resave permalink settings if they return errors.
  • Recreate or confirm all DNS records, then update the A record to the new server.

After the switch.

  • Issue or confirm the SSL certificate and test HTTPS on all key pages.
  • Send test emails to and from business mailboxes.
  • Submit the contact form and confirm notifications arrive.
  • Check scheduled posts and cron-dependent tasks.
  • Change admin and database passwords, and remove unused accounts.
  • Monitor Search Console for crawl errors over the following days.
  • Cancel the old host only after a week of clean operation and a final backup download.

Following this checklist turns migration from a gamble into a predictable process with a clear rollback path at every step.

Key Takeaways

  • Migrations usually fail at the edges, especially DNS, email, and SSL, rather than in copying files.
  • Lowering DNS TTL in advance makes the switch faster and easier to roll back.
  • Testing through your hosts file lets you verify the new server on the real domain before visitors see it.
  • Use serialization-safe tools like WP-CLI search-replace whenever domains or URLs change.
  • Keep the old hosting active for at least a week as a rollback plan before cancelling.

Frequently Asked Questions

Will moving WordPress to a new host cause downtime?

A properly sequenced migration causes little or no downtime. Because the old server stays live while you build and test the new one, visitors continue reaching a working site. Lowering DNS TTL beforehand shortens the transition period, and a brief content freeze prevents data loss during the switch.

Will changing hosts hurt my SEO?

Not if URLs, content, and HTTPS stay the same and the site remains available. Search engines care about content and accessibility, not which host you use. Problems arise from broken links, missing pages, or extended downtime. If URLs change, add permanent redirects from every old URL to its new equivalent.

What is the easiest way to migrate a WordPress site?

For most owners, the easiest route is a free migration service from the new host or a reputable migration plugin such as Duplicator, WPvivid, or All-in-One WP Migration. These package files and database together. You still need to verify the site, manage DNS, and protect email records yourself.

Do I need to move my email when I change hosts?

Only if your email is hosted with your old web host. Check your MX records to see where mail is handled. If mailboxes live on the old host, migrate them or move to a dedicated email provider before cancelling. If email uses a separate provider, simply preserve the existing DNS records.

How long does DNS propagation take after migration?

Propagation depends on the TTL values on your records and on how resolvers cache them. With TTL lowered in advance, most visitors reach the new server quickly. Some resolvers may hold old values longer, which is why keeping the old host running for several days is a sensible safeguard.

Should I change anything after the migration is complete?

Yes. Change admin and database passwords, review user accounts, confirm backups are running on the new host, enable server caching, test forms and email, and monitor Search Console for errors. Once stable, consider upgrading PHP on staging, since a new host often supports newer versions.

Conclusion

The most important principle in any WordPress migration is to keep the old site live until the new one is fully proven. Inventory DNS and email first, copy and test privately through your hosts file, switch only when everything works, and keep a rollback path for a week. A new host is also the perfect moment to start clean, so before reinstalling everything you had, rebuild around a lean, audited plugin list and leave the clutter behind.

Chat on WhatsApp