Skip to content
MinniHost Guides

How to Migrate a WordPress Site to a New Host

By Posted Topic: Moving a Site

To migrate a WordPress site to a new host, back up the files and the database, copy both to the new host, update wp-config.php if the database details changed, test the copy before changing anything public, then switch DNS. If the address changes, use a tool that handles serialized data and never edit the GUID column. Keep the old host until you confirm the move.

Two cardboard moving boxes on a wooden floor beside a laptop on a table

Part of our guide: Website Migration: How to Move a Site to a New Host

A WordPress move has two parts that must travel together: the files and the database. This guide is a support page for our site-move hub and shows the manual method and what to look for in a plugin. If your new host is not chosen yet, read WordPress hosting first. Take the SEO steps from the migration SEO checklist.

Before you start: back up files and database

WordPress documentation says to back up the WordPress directory, images, plugins and other files, and the database. A restorable backup needs both. Keep copies off the old server and do not delete anything on the old host. If the move is driven by price, read what low-cost plans usually leave out first. Confirm the new host meets WordPress.org’s requirements: PHP 8.3 or greater and MariaDB 10.11 or greater or MySQL 8.4 or greater.

Method 1: a migration plugin

A migration plugin packages files and database and unpacks them on the new host. When you choose one, check that it:

  • handles serialized data when it rewrites URLs;
  • lets you test on the new host before the switch;
  • works within the new host’s upload and time limits;
  • is maintained, with a recent update date;
  • is verified by a backup you can restore if it fails.

Plugin steps vary, so follow the plugin’s own documentation. This site recommends no specific plugin.

Method 2: manual

  1. Export the database from the old host, using phpMyAdmin or a command-line tool provided by the host.
  2. Copy the files from the old site’s directory to the new host.
  3. Create a database and a user on the new host, then import the export.
  4. Edit wp-config.php if the database name, user or host changed. WordPress documentation says to put the correct values in.
  5. Fix URLs only if the address changes. Use a tool such as WP-CLI search-replace, which handles serialized data. Never change the GUID column.
  6. Permalinks. WordPress documentation says the rewrite rules may not carry over, so check .htaccess or the server rules and re-save the permalink settings once the site is live.

Test on the new host before changing anything public

Use a temporary hostname or an IP-restricted environment, as Google suggests, and add a noindex rule to the test copy. Check the home page, several posts, images, forms, logins and the admin area. Then remove the noindex rule and any robots.txt blocks before the real switch.

Switch over and fix URLs

Update DNS to point to the new host. Google advises lowering the DNS TTL at least a week in advance. Domain and DNS record details are outside this guide, so follow your host’s instructions. Keep the old host until its traffic reaches zero.

  • HTTPS: the new host needs a certificate. See what an SSL certificate is.
  • Caching: clear caches and check any caching plugin against the new host’s built-in caching.
  • Permalinks: re-save them.
  • Email: confirm that mail still works if it moved or was hosted on the old server.
  • Backups: set up a schedule on the new host straight away.

Rollback plan

Because the old host is untouched, rollback means pointing DNS back to it. Keep it for at least until traffic reaches zero and the new site is stable. If you changed URLs in the new database, keep the old export so you can compare.

Sources re-opened and compared with this text by the MinniHost Guides team on 2026-11-17. MinniHost Guides is an independent editorial site and does not sell hosting.

Your questions answered

How do I move WordPress to a new host?

Back up the files and database, create a database and user on the new host, upload the files, import the database, and update wp-config.php if the database details changed. Test the copy on the new host before changing anything public, then point your domain at it. Keep the old host running until traffic has fully moved.

Can I migrate WordPress without a plugin?

Yes. The manual method needs only a file copy and a database export and import, as WordPress documentation describes. It takes more care than a plugin, mainly with wp-config.php, URLs stored in the database and permalinks. Plugins automate those steps, but choose one that handles serialized data and that you can test first.

Will I lose my content?

Not if you back up first and keep the old host until the move is confirmed. The database holds posts and comments and the files hold themes, plugins and uploads, so you need both. If the new site looks incomplete, leave DNS unchanged and fix the copy, because the original is still intact.

How do I test before switching?

Use a temporary hostname, an IP-restricted environment or a local hosts-file override, and add a noindex rule to the test copy so it is not indexed. Check pages, images, forms, logins and permalinks. Google advises removing the noindex rule and any robots.txt blocks before the real move starts.

What breaks most often?

Common problems are wrong database details in wp-config.php, old URLs left in the database, permalink rewrite rules that did not carry over, and missing PHP features or versions on the new host. WordPress documentation advises re-saving permalink settings after the site is live and checking the database settings first.

Where this comes from

  1. WordPress Advanced Administration: Moving WordPress (developer.wordpress.org)
  2. WordPress Advanced Administration: Backups (developer.wordpress.org)
  3. WordPress.org: Requirements (wordpress.org)
  4. Google Search Central: Site move without URL changes (developers.google.com)

More on this topic

Top of page