How to Migrate WordPress to a New Host Without Breaking Anything

Yani I
Yani I Feb 18, 2026 ยท 23 min read
How to Migrate WordPress to a New Host

Moving your WordPress site to a new host is one of those tasks that sounds simple until you actually do it. Export, import, done, right? In practice, there are dozens of things that can go wrong: broken links, missing images, database errors, email that stops working, and SEO rankings that quietly disappear.

We have seen it all across 60 million+ site migrations with All-in-One WP Migration. This guide is everything we have learned, condensed into one resource.

It covers three migration methods (plugin, hosting provider tools, and manual), but more importantly, it covers the preparation and post-migration steps that most guides skip entirely. Those steps are where migrations actually succeed or fail.

Which Migration Method Should You Use?

Before diving in, here is a quick comparison to help you choose the right approach:

Plugin MigrationHosting Provider ToolManual Migration
DifficultyEasyEasyAdvanced
Best forMost sitesNew hosting customersLarge or complex sites
Time15-30 minutes1-48 hours1-3 hours
ControlHighLowFull
CostFree (or from $69)Usually freeFree
Handles large sitesYes (with extension)VariesYes
Requires technical knowledgeNoNoYes (FTP, SQL, SSH)

For most WordPress sites, using a migration plugin is the fastest and safest option. Manual migration is better for sites with unusual server configurations or very large databases where you need granular control.

Migration Timeline: The Big Picture

Here is the complete migration process at a glance. The actual migration (exporting and importing your site) is the easy part. The preparation and verification around it is what makes the difference between a smooth migration and a broken site.

48 hours before migration:

Day of migration:

After going live:

7-14 days after migration:

Now let’s walk through each step in detail.

Before You Start: Pre-Migration Preparation

Skipping preparation is the number one reason migrations fail. Before you touch anything, work through this checklist.

1. Back Up Your Current Site

This is non-negotiable. Create a full backup of your files and database before making any changes. If something goes wrong during migration, you need a way to restore your original site.

You can use All-in-One WP Migration to create a complete backup with one click, or use your hosting provider’s backup tools. Store the backup somewhere other than your current hosting account, such as your local computer or cloud storage.

Not sure whether to use cloud or local storage? Read our comparison of cloud storage vs. local backup for WordPress.

2. Lower Your DNS TTL (Critical)

This is the step that almost every migration guide skips, and it is one of the most important for avoiding downtime.

TTL (Time to Live) tells DNS servers how long to cache your domain’s IP address. When you change your DNS to point to the new host, every DNS server in the world needs to pick up the new address. If your TTL is set to 86400 (24 hours), that process can take up to a full day. During that time, some visitors see the old server and some see the new one.

What to do: Log into your domain registrar or DNS provider (Cloudflare, Namecheap, GoDaddy, etc.) and lower the TTL on your A record and CNAME records to 300 seconds (5 minutes). Do this 24-48 hours before you plan to migrate, because the old TTL value needs to expire first.

Here is what this looks like in practice:

  1. 48 hours before migration: Lower TTL from 86400 to 300
  2. Migration day: Move site, test on new host, then update DNS
  3. DNS propagation: Takes ~5 minutes instead of ~24 hours because the TTL is low
  4. After everything is stable (24-48 hours later): Raise TTL back to 86400

This one change is the difference between a seamless migration and hours of “some people can see the site and some can’t” confusion.

3. Check PHP Version Compatibility

Your new host might run a different PHP version than your old one. If your site uses PHP 7.4 and the new host defaults to PHP 8.2, some plugins or themes may break.

What to do:

4. Audit Your Email Setup

If your current host also handles your email (yourname@yourdomain.com), migrating to a new host can silently break email delivery. This catches a lot of people off guard because the website works perfectly on the new host, but emails stop arriving.

This happens because your MX records (which control email routing) may be tied to your old hosting server. When you update your DNS A record to point to the new host, the MX records may also need to change.

What to do:

Important: If you are managing DNS at your domain registrar (not through your host), make sure you only update the A record and CNAME for the website. Leave the MX records untouched unless you are intentionally changing email providers.

5. Document Your Current Setup

Take note of the following before you start:

This information will help you verify everything is working correctly after migration.

6. Disable Caching and Security Plugins

Caching plugins (WP Super Cache, W3 Total Cache, WP Rocket) and security plugins (Wordfence, Sucuri) can interfere with the migration process. Deactivate them before exporting your site, and reactivate them after migration is complete.

A migration plugin handles the heavy lifting for you: exporting files, database, themes, plugins, and media into a single package, then importing it on the new host. This is the easiest and safest method for most sites.

We will use All-in-One WP Migration for this walkthrough. It is the most widely used WordPress migration plugin with over 5 million active installations.

Step 1: Install All-in-One WP Migration on Your Current Site

Go to Plugins > Add New in your WordPress dashboard, search for “All-in-One WP Migration,” and click Install Now, then Activate.

Step 2: Export Your Site

Go to All-in-One WP Migration > Export in the dashboard. Click Export To and select File. The plugin will package your entire site into a single downloadable .wpress file, including:

The export also automatically handles serialized data in the database, so URL references are updated safely without corruption. This is a critical detail that manual migration often gets wrong.

Download the .wpress file to your computer when the export completes.

For larger sites: The free plugin has no import limit of its own, but your hosting provider may enforce upload size restrictions through PHP settings (upload_max_filesize, post_max_size). The Unlimited Extension bypasses these hosting limits entirely, so you can import sites of any size regardless of your server configuration.

Step 3: Set Up WordPress on the New Host

On your new hosting account:

  1. Install a fresh copy of WordPress using your host’s one-click installer or manual installation
  2. Log into the new WordPress dashboard
  3. Go to Plugins > Add New, search for “All-in-One WP Migration,” and install and activate it

The fresh WordPress installation is temporary. It will be completely overwritten by the import in the next step.

Step 4: Import Your Site

Go to All-in-One WP Migration > Import on the new WordPress installation. Upload the .wpress file you exported in Step 2. The plugin will:

  1. Unpack all files (themes, plugins, media)
  2. Import the entire database
  3. Update any URL references if the domain or path has changed
  4. Preserve all settings and configurations

Important: After the import finishes, you will be logged out (because the database now contains the user accounts from your old site). Log back in with the username and password from your old site, not the one you created during the fresh WordPress installation.

Then go to Settings > Permalinks and click Save Changes to flush rewrite rules (you don’t need to change anything, just click save).

Step 5: Verify Before Going Live

Before changing your DNS, verify the site works on the new host. See the “Testing Before Going Live” section below.

Method 2: Using Your Hosting Provider’s Migration Tool

Most hosting providers offer free migration tools or services. These are typically handled through their control panel and may include:

How It Works

  1. Sign up for your new hosting account
  2. Provide your old hosting credentials (FTP details, cPanel access, or WordPress admin login)
  3. The host’s migration tool copies your files and database to the new server
  4. You verify the site and update DNS

Pros and Cons

Pros: Hands-off, often free, handled by the host’s team

Cons: You have less control over the process, it may take 24-48 hours for managed migrations, and some hosts only offer this for new customers

If you choose this method, still follow the pre-migration preparation steps above and the post-migration checklist below. The hosting provider handles the file transfer, but DNS, email, and verification are still your responsibility.

Method 3: Manual Migration

Manual migration gives you full control but requires more technical knowledge. Use this method if the plugin method is not an option (very large sites, non-standard server configurations, or restricted hosting environments).

Step 1: Export Your Database

Log into phpMyAdmin on your current host (usually accessible through cPanel or your hosting dashboard). Select your WordPress database, click Export, choose Quick export method with SQL format, and download the file.

For large databases, use WP-CLI instead:

wp db export backup.sql

Step 2: Download Your Files

Connect to your current host via FTP or SFTP (using FileZilla, Cyberduck, or a similar client). Download your entire WordPress directory, including wp-content (themes, plugins, uploads), wp-config.php, and .htaccess.

For large sites, use SSH with rsync for faster transfers:

rsync -avz user@oldhost:/path/to/wordpress/ /local/backup/

Step 3: Upload Files to the New Host

Upload all WordPress files to the new host using FTP/SFTP or rsync. Place them in the correct document root directory (usually public_html or www).

Step 4: Create a Database on the New Host

In your new host’s control panel:

  1. Create a new MySQL database
  2. Create a new database user
  3. Assign the user to the database with full privileges
  4. Note the database name, username, and password

Step 5: Import the Database

Import your SQL file into the new database using phpMyAdmin (upload the .sql file via the Import tab) or WP-CLI:

wp db import backup.sql

Step 6: Update wp-config.php

Edit wp-config.php on the new host and update the database connection details:

define('DB_NAME', 'new_database_name');
define('DB_USER', 'new_database_user');
define('DB_PASSWORD', 'new_database_password');
define('DB_HOST', 'localhost');

Your new host may use a different DB_HOST value. Check their documentation.

Step 7: Update URLs in the Database

If your site URL changes (different domain or from HTTP to HTTPS), you need to update URLs in the database. Do not use a simple find-and-replace on the SQL file. WordPress stores some data in serialized format, and a naive search-and-replace will corrupt it.

Use WP-CLI’s search-replace command, which handles serialized data safely:

wp search-replace 'https://old-domain.com' 'https://new-domain.com' --all-tables

If you don’t have WP-CLI access, use the Better Search Replace plugin instead.

Changing your domain? Read our detailed guide on changing your WordPress domain name.

Step 8: Fix File Permissions

Different hosts use different permission configurations. If you see “forbidden” errors or a white screen after migration, file permissions are the likely cause.

Standard WordPress permissions:

You can fix permissions via SSH:

find /path/to/wordpress/ -type d -exec chmod 755 {} \;
find /path/to/wordpress/ -type f -exec chmod 644 {} \;
chmod 600 /path/to/wordpress/wp-config.php

Testing Before Going Live

Never switch your DNS before testing the site on the new host. There are two ways to preview your site on the new server before making it public.

Option 1: Edit Your Hosts File

Your computer’s hosts file lets you override DNS locally, so your browser loads the site from the new server while everyone else still sees the old one.

On Mac/Linux, edit /etc/hosts:

123.456.789.0  yourdomain.com  www.yourdomain.com

On Windows, edit C:\Windows\System32\drivers\etc\hosts with the same format.

Replace 123.456.789.0 with your new server’s IP address. Save the file, clear your browser cache, and visit your site. You will see the version on the new host.

After testing, remove the line from your hosts file.

Option 2: Use a Temporary URL

Most hosting providers give you a temporary URL to access your site before DNS is configured (something like youraccount.server123.hostingprovider.com). Check your hosting dashboard for this URL.

Note that some things may not work perfectly on a temporary URL (images with hardcoded domain names, SSL certificates, etc.), but it is good enough to verify the basic structure of your site.

What to Test

Before switching DNS, go through this verification checklist carefully. It is much easier to fix issues now, before the site is live, than after.

Core functionality:

Interactive features:

Technical checks:

For WooCommerce sites:

If you run an online store, you need to test the full purchase flow. See our complete WooCommerce migration guide for a detailed checklist covering payment gateways, order processing, and subscription continuity.

Keep Your Old Host Active

Do not cancel your old hosting account immediately after migration. Keep it active for at least 7-14 days after going live on the new host. Here is why:

Once you are confident everything is working on the new host, you can cancel the old hosting account.

Going Live: DNS and SSL

Once testing looks good, it is time to point your domain to the new host.

Update DNS Records

Log into your domain registrar or DNS provider and update:

If you lowered your TTL in the preparation step, propagation will happen within minutes. You can verify propagation using a tool like whatsmydns.net, which checks DNS servers around the world to show you where propagation has completed and where it is still in progress.

If you did not lower your TTL, propagation can take up to 24-48 hours. During this period, some visitors will see the old site and some will see the new one.

Set Up SSL

Most hosts offer free SSL certificates through Let’s Encrypt. The installation process varies by host:

sudo certbot --apache -d yourdomain.com -d www.yourdomain.com

After SSL is active, verify your WordPress settings:

For a detailed walkthrough, read our guide on moving WordPress from HTTP to HTTPS.

Post-Migration Checklist

This is the section most migration guides leave out entirely. After your site is live on the new host, work through every item on this list.

Cache and Performance

SSL and Security

Email

Cron Jobs and Scheduled Tasks

This is a silent failure that most people don’t notice for days or weeks. After migration, verify:

If WordPress cron seems unreliable on the new host, you can disable it and use a real server cron instead. Add this to wp-config.php:

define('DISABLE_WP_CRON', true);

Then set up a server cron job to trigger WP-Cron:

*/15 * * * * wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1

SEO and Analytics

Functionality

Handling Large Sites

If your WordPress site has a large database (500MB+) or a large media library (several GB), standard migration methods may time out or fail. Here are strategies for each scenario.

For Large Databases (500MB+)

Large databases are the most common cause of migration failures. phpMyAdmin typically times out on databases larger than 100-200MB, and plugin-based imports may hit server memory limits.

Solutions:

mysqldump -u username -p --max_allowed_packet=512M database_name > backup.sql

For Large Media Libraries (5GB+)

FTP transfers for large media libraries are painfully slow and prone to disconnection. A 10GB media library can take hours over FTP and will likely fail at least once.

Solutions:

rsync -avz --progress user@oldhost:/path/to/wp-content/uploads/ /path/to/wp-content/uploads/

For High-Traffic Sites

Migrating a site that receives thousands of visitors per hour requires extra planning to avoid any visible disruption.

What to Do If Things Go Wrong

Rollback Plan

If the migration fails or you discover issues after going live:

  1. Revert DNS immediately. Change your A record back to the old host’s IP address. If you lowered the TTL beforehand, this will take effect within minutes.
  2. Restore from backup on the old host if any data was modified during the migration attempt.
  3. Diagnose the issue on the new host while the old site is serving traffic. Fix the problem, test again using the hosts file trick, and retry the DNS switch.

Common Issues

Something broken after migrating? White screen, 404 errors, missing images, or login loops are all common and fixable. See our guide to 15 common WordPress migration errors and how to fix them for step-by-step solutions.

When to Ask for Help

If you are dealing with a complex migration (see our WordPress multisite migration guide for network-specific instructions), very large database, or custom server configurations, consider reaching out to your hosting provider’s support team. Many hosts offer assisted migration for free, and their team knows the specific server configuration requirements.

FAQ

How long does a WordPress migration take?

For a small to medium site (under 1GB), the actual migration takes 15-30 minutes using a plugin. DNS propagation can add a few minutes to a few hours depending on your TTL settings. Plan for a total of 1-2 hours including testing.

Will my site go down during migration?

Not if you follow this guide. Your old site stays live while you set up the new one. The only potential gap is during DNS propagation, which is minimal if you lowered your TTL beforehand.

Do I need to reinstall my plugins and themes on the new host?

No. Both the plugin method and manual method transfer your entire WordPress installation, including all plugins, themes, and their settings. You will need to reactivate caching and security plugins that you disabled before migration.

What happens to my SEO rankings after migration?

If you keep the same domain and URL structure, your rankings should not be affected. Make sure to re-verify your site in Google Search Console, submit your sitemap, and monitor for 404 errors. For a deeper dive, read about preserving SEO during migration.

Can I migrate from one host to another without changing my domain?

Yes, this is the most common migration scenario. Since your domain stays the same, you only need to update your DNS A record to point to the new host’s IP address. All your URLs, internal links, and SEO settings remain unchanged.

What if my new host uses a different PHP version?

Check PHP compatibility before migrating (see the pre-migration preparation section above). If your site needs an older PHP version, most hosts let you select the PHP version in the control panel. Long-term, you should update your plugins and themes to support the latest PHP version for security and performance.

Should I migrate my staging site or my live site?

Always migrate your live (production) site. A staging site may have test content, disabled features, or a different database state. Export directly from your live site to ensure you capture the current state of everything, including recent posts, comments, orders, and settings.

What if my old host has already expired?

If you still have a backup file (.wpress export, SQL dump, or file backup), you can restore from that. If you do not have a backup, contact your old host immediately. Many hosts retain account data for 30-90 days after expiration. The sooner you act, the better your chances of recovery.

Can I migrate a WordPress.com site to a self-hosted WordPress.org site?

Yes, but this is a different process than a host-to-host migration. WordPress.com offers a built-in export tool (Tools > Export) that creates an XML file of your content. You can then import this into a self-hosted WordPress.org installation using the WordPress Importer plugin. Note that themes, plugins, and some customizations will not transfer and will need to be recreated manually.

Running a WooCommerce store? E-commerce migrations require extra steps for payment gateways, order handling, and subscription continuity. Read our complete WooCommerce migration guide for a detailed walkthrough.