All articles Updates

How to Migrate a WordPress Site: Step by Step and Without Downtime (2026)

Three ways to migrate a WordPress site, a clean manual migration step by step, switching over without downtime and the checks after the move.

WP Beekeeper Team · 7 min read
A moving box travelling from one server to another: migrating a WordPress site

Sooner or later most WordPress sites move: to a faster or cheaper host, to a new domain, from a staging copy to the live server or from an agency’s server to your own. Done well, visitors and Google notice nothing. Done badly, you lose images, emails, form entries or rankings, sometimes all at once.

This guide shows the three ways to migrate a WordPress site, the steps of a clean manual move, how to switch over without downtime and the checks after the move that are most often forgotten.

Key takeaways

  • Start with a full backup and an inventory: plugins, PHP version, email, DNS records, cron jobs and anything that talks to the outside world.
  • For most sites, the host’s migration service or a migration plugin is enough. Large sites and shops benefit from a manual or WP-CLI migration.
  • Never change URLs in the database with a plain text replace. Use a tool that handles serialised data, such as WP-CLI search-replace.
  • Test the new server before you switch DNS, and lower the DNS TTL a day in advance.
  • After a domain change: 301 redirects from every old URL and a Change of Address in Google Search Console.
  • Shops and booking sites need a short freeze during the switch, so no orders are lost between the copy and the go-live.

When you need to migrate WordPress

SituationWhat changesMost important extra step
New host, same domainServerDNS switch without downtime, check email (MX records)
New domainURLs everywhere301 redirects and a Change of Address in Search Console
HTTP to HTTPSProtocolRedirect all HTTP URLs, fix mixed content
Staging to liveServer and URLsDo not overwrite new orders or entries on the live site
Subfolder to root (or back)PathRedirect old paths, update permalinks
Agency server to your own hostingServer, sometimes licencesTransfer premium plugin licences and access

Three ways to migrate

MethodGood forWatch out for
Host migration serviceMost small and medium sites, if the new host offers it freeAsk what is included: email, DNS, SSL, testing
Migration plugin (for example All-in-One WP Migration, Duplicator or Migrate Guru)Small to medium sites, no command line neededUpload limits for large sites, premium features behind a paywall
Manual or WP-CLILarge sites, shops, custom setups, developersRequires SFTP, database access and care with the URL replacement

Before you start: preparation

  • Make a full backup of files and database and store it outside both servers.
  • Note the environment: PHP version, database version, memory limit and special server settings. The new server should match or be newer.
  • Take stock of everything that talks to the outside: email accounts and MX records, SMTP settings, payment gateways, API keys, webhooks, CDN, cron jobs.
  • Lower the DNS TTL (time to live) of your domain to a few minutes, ideally a day in advance. Then the switch spreads quickly.
  • Plan a time with little traffic, and for shops a short freeze on new orders.

Manual migration step by step

  1. Copy all WordPress files from the old server to the new one, via SFTP or with a compressed archive.
  2. Export the database from the old server (phpMyAdmin or wp db export).
  3. Create a new database and user on the new server and import the export.
  4. Enter the new database name, user, password and host in wp-config.php.
  5. If the domain changes, replace the old URL with the new one in the database with a tool that handles serialised data, for example WP-CLI.
  6. Test the new server before switching DNS (see below).
  7. Switch DNS to the new server and install the SSL certificate.
  8. Run the checks after the migration.

Step 5 with WP-CLI, first as a dry run:

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=guid

The official Migrating WordPress guide explains why: some themes and plugins store data in a serialised format with string lengths, and a plain text replace breaks it. It also advises against changing the GUID column, which is why the command skips it. The wp search-replace reference lists all options.

Switching over without downtime

Test the site on the new server before the world sees it. The simplest way is your computer’s hosts file: point your domain to the new server’s IP address, only for you. Then click through the site, log in, send a test form and place a test order. Many hosts also offer a temporary preview URL.

When everything works, change the DNS records. With a low TTL most visitors reach the new server within minutes to hours. Keep the old server running for a few days, so stragglers still see a working site and you have a fallback.

For shops, bookings and membership sites: anything that happens on the old site after you copied the database is missing on the new one. Either freeze orders during the switch, or copy the database again just before switching DNS.

After a domain change: protect your rankings

If the domain changes, Google has to learn that your content has moved. According to Google’s guide on site moves with URL changes, you should:

  • set up permanent server-side redirects (301 or 308) from every old URL to the matching new URL, not all to the home page,
  • submit a Change of Address in Search Console for the old site (not needed for HTTP to HTTPS or www to non-www),
  • add the new domain in Search Console and submit the sitemap,
  • update internal links, canonical tags and links in your Google Business Profile, social profiles and directories.

Keep the redirects in place for at least a year, ideally permanently.

Checklist after the migration

  • Home page, key pages, images and downloads load over HTTPS without warnings.
  • Logging in to the dashboard works.
  • Permalinks work: if subpages show 404 errors, save the permalink settings once under Settings → Permalinks.
  • Contact forms send and arrive, including notifications.
  • Email: MX, SPF, DKIM and DMARC records are correct, and the mailboxes still work.
  • Shop: test order, payment in test mode, order emails.
  • Cron jobs, backups and scheduled posts run on the new server.
  • Caching and CDN point to the new server, and old caches are cleared.
  • Search Console shows no new errors, and the sitemap is reachable.

Common migration problems

ProblemTypical causeFix
“Error establishing a database connection”Wrong database name, user, password or host in wp-config.phpCheck the credentials against the new hosting panel
Subpages show 404Rewrite rules not set on the new serverSave permalinks once, check .htaccess or the Nginx config
Images missing or loading from the old domainURLs not replaced or replaced incompletelyRun search-replace again, clear caches
Mixed content warningsSome resources still load over HTTPReplace http:// URLs, check theme and plugin settings
Emails no longer arriveMX records changed or SMTP not configuredRestore MX records, set up SMTP
Plugin import failsUpload size or execution time limitsUse a different method or ask the host to raise limits

Before you migrate a large or business-critical site, try the whole process on a staging copy first. Our guide on WordPress staging explains how.

Keep your site safe on its new server.After the move, WP Beekeeper makes a full backup before every update, installs updates in the right order, checks every page and monitors uptime and SSL every five minutes. Try it free for 14 days.

Start free trial →

Sources and further reading

Frequently asked questions

How do I migrate a WordPress site to a new host?

Make a full backup, copy the files, export and import the database, update wp-config.php, test the new server with your hosts file, then switch DNS and check the site. Many hosts and migration plugins do most of these steps for you.

What is the best way to migrate WordPress?

For most sites, the host’s free migration service or a migration plugin is the easiest. For large sites and shops, a manual or WP-CLI migration gives more control.

Will migrating WordPress affect my SEO?

Not if you keep the same URLs. If the domain changes, set up 301 redirects from every old URL and submit a Change of Address in Google Search Console. A short temporary dip is normal.

How do I migrate WordPress without downtime?

Lower the DNS TTL in advance, set up and test the site on the new server via your hosts file, switch DNS only when everything works and keep the old server running for a few days.

Why do my pages show 404 after the migration?

Usually the rewrite rules are missing on the new server. Save the permalinks once under Settings → Permalinks and check the .htaccess file or the Nginx configuration.

How do I change the domain of a WordPress site?

Replace the old URL with the new one in the database using a tool that handles serialised data, set up 301 redirects from the old domain and submit a Change of Address in Search Console.

Conclusion

A WordPress migration is mostly preparation: a backup, an inventory of everything connected to the site, a test on the new server and a planned switch. Replace URLs only with tools that handle serialised data, protect your rankings with redirects after a domain change and work through the checklist afterwards. Then the move is invisible to your visitors.