WordPress Basics

How to Migrate WordPress Site to New Host

WordPress basics for beginners

If you’ve never done it before, figuring out how to migrate a WordPress site to a new host can feel risky. You don’t want broken pages, white screens, or a site that disappears while DNS catches up.

The good news is you can move your WordPress site safely if you follow a clear checklist: back up everything, copy your files and database, update configuration, point your domain to the new server, and test before going live.

In this guide, you’ll learn step by step how to migrate a WordPress site to a new host using the traditional manual method. We’ll also look at plugin-based and host-assisted options so you can choose the WordPress migration style that fits your comfort level.

What You Need Before You Migrate a WordPress Site to a New Host

  • Admin access to your current WordPress dashboard.
  • cPanel or hosting control panel access (old host and new host).
  • FTP/SEO and UX, and where you will see it in daily work.”>SFTP credentials or File Manager access on both servers.
  • Access to your domain DNS (domain registrar or DNS provider).
  • Optional: A staging subdomain on the new host for testing.
Before you migrate a WordPress site to a new host, always create a full backup (files + database). If anything goes wrong, you’ll need that backup to restore your site.

Step 1: Choose and Prepare Your New Host for WordPress Site Migration

Before you can move anything, your new hosting account must be ready to receive your WordPress site.

  1. Sign up for your new hosting plan and complete account setup.
  2. In the new host’s control panel, create a new site or add your domain (often called Add-on Domain or New Site).
  3. Note down:
    • The document root path (e.g. public_html or example.com/public).
    • FTP/SFTP host, username, and password.
    • Database host (often localhost), name, username, and password (you’ll create these soon).
  4. If your new host offers a staging subdomain, create it now so you can test the migrated copy before switching DNS.

Step 2: Back Up Your WordPress Site Before You Migrate to a New Host

To migrate a WordPress site to a new host safely, you need two things from the old server:

  • All WordPress files (core, themes, plugins, uploads).
  • Your WordPress database (posts, settings, users, etc.).

2.1 Download WordPress Files for Migration to a New Host

  1. Connect to your current host using FTP/SFTP or open File Manager in cPanel.
  2. Navigate to the directory where WordPress is installed (often public_html or a subfolder).
  3. Select all files and folders, including:
    • wp-admin, wp-includes, wp-content
    • wp-config.php and all other PHP files
  4. Compress them into a single ZIP file if using File Manager (faster for download).
  5. Download the ZIP or all files to your computer.

2.2 Export the WordPress Database for Site Transfer

  1. In your current host’s control panel, open phpMyAdmin.
  2. Select the database used by your WordPress site from the left sidebar.
  3. Click the Export tab.
  4. Choose Quick export method and SQL format.
  5. Click Go to download the .sql file to your computer.
If you’re not sure which database your site uses, open wp-config.php in your old server and check the DB_NAME value.

Step 3: Put Your Old WordPress Site in Maintenance Mode During Migration

While you migrate a WordPress site to a new host, you want to avoid new orders, comments, or posts being added to the old site because they won’t exist in your migrated copy.

  1. Install a simple maintenance mode or coming soon plugin on the old site.
  2. Activate it so regular visitors see a maintenance page.
  3. Keep yourself logged in so you can still access the admin area if needed.

If your site is small and low traffic, you can sometimes skip this step, but it’s safer to enable maintenance mode during WordPress migration.

Step 4: Create a New Database for Your Migrated WordPress Site

Your migrated WordPress site needs a new database to import into.

  1. Log in to the new host’s control panel and open MySQL Databases (or equivalent).
  2. Create a new database (e.g. wp_mysite).
  3. Create a new database user and assign a strong password.
  4. Grant the user All Privileges on the new database.
  5. Note down:
    • Database name
    • Database username
    • Database password
    • Database host (usually localhost on shared hosting)

Step 5: Upload WordPress Files to the New Hosting Server

Now you’ll copy your WordPress files to the new server as part of the migration.

  1. Connect to the new host with FTP/SFTP or open its File Manager.
  2. Go to the document root of your new site (e.g. public_html or example.com).
  3. Upload the ZIP file containing your WordPress files.
  4. Use File Manager to Extract the ZIP so all files are in the correct directory.
  5. Confirm that wp-admin, wp-includes, wp-content, and wp-config.php exist on the new host.
Make sure you don’t nest your files one level too deep (e.g. public_html/site/public_html/wp-admin). WordPress files should live directly in the document root for that site.

Step 6: Import Your WordPress Database on the New Host

With your empty database created, it’s time to import your old content.

  1. On the new host, open phpMyAdmin from the control panel.
  2. Select the new database you created in Step 4.
  3. Click the Import tab.
  4. Click Choose File and select the .sql file you exported earlier.
  5. Leave most settings at default and click Go.
  6. Wait for the success message indicating all tables have been imported.

If your SQL file is very large, your host may have upload size limits. In that case, ask support to import it for you or use a command-line tool if available.

Step 7: Update wp-config.php After WordPress Site Migration

To complete the core migration, your WordPress configuration file must point to the new database.

  1. In the new host’s File Manager, open wp-config.php for editing.
  2. Find the lines that define your database settings:
    define( 'DB_NAME', 'old_db_name' ); define( 'DB_USER', 'old_db_user' ); define( 'DB_PASSWORD', 'old_db_password' ); define( 'DB_HOST', 'localhost' ); 
  3. Replace DB_NAME, DB_USER, and DB_PASSWORD with the values from your new host.
  4. Leave DB_HOST as localhost unless your host specifies a custom value.
  5. Save the file.

If your domain name is staying the same, this is usually enough for WordPress to load correctly on the new host once DNS is updated.

Step 8: Update URLs After You Migrate a WordPress Site to a New Host

If you’re migrating a WordPress site to a new host with a different domain (or moving from example.com/blog to example.com), you need to update URLs in the database.

  1. Temporarily log in to the WordPress dashboard on the new host using the server’s preview URL or hosts file trick (many hosts provide a preview link).
  2. Install a reliable search and replace plugin or use a dedicated script recommended by your host.
  3. Search for your old domain (e.g. https://oldsite.com) and replace it with your new domain (e.g. https://newsite.com).
  4. Also update paths if you moved from a subfolder to root (e.g. /blog to /).
  5. Run the tool and then clear any caches.
Never run raw search/replace directly on the database without a backup. A mistake here can corrupt serialized data or break links across your site.

Step 9: Point Your Domain to the New WordPress Host (DNS Update)

Once your site looks correct on the new host, it’s time to send real visitors there.

9.1 Update Nameservers When You Migrate WordPress Hosting

  1. Log in to your domain registrar (where you bought your domain).
  2. Find the DNS or Nameservers section.
  3. Replace the old nameservers with the new host’s nameservers (your host will provide these).
  4. Save changes.

9.2 Or Update A Records to Point to the New Server

  1. Locate the DNS zone for your domain (Cloudflare, registrar, or DNS provider).
  2. Update the A record for @ and www to point to the new server’s IP address.
  3. Save and apply changes.

DNS changes can take anywhere from a few minutes to 24 hours to propagate worldwide. During that time, some visitors may still see the old host while others see the new one.

Step 10: Test Your Migrated WordPress Site and Clean Up

After you migrate a WordPress site to a new host and update DNS, you should thoroughly test the live site.

  1. Clear your browser cache or open a private/incognito window.
  2. Visit your domain and confirm the site loads from the new host.
  3. Click through key pages: Home, About, Services, Blog posts, Contact.
  4. Test forms, checkout (if eCommerce), search, and login.
  5. Check images, downloads, and embedded media.
  6. Disable maintenance mode on the old site once you’re sure everything works.
  7. After a few days, remove old backups from the previous host and cancel the old hosting plan if you no longer need it.
Keep your backup files and database export in safe storage even after the WordPress migration. They’re useful if you ever need to roll back or repeat the process.

Quick Comparison of Ways to Migrate a WordPress Site to a New Host

Use this table to choose the best method for your situation when you migrate a WordPress site to a new host.

Method Where You Use It Main Purpose
Manual migration (files + database) cPanel, phpMyAdmin, FTP/SFTP Gives you full control over every step; works on almost any host without extra plugins.
Migration plugin WordPress dashboard on old and new sites Automate backups and restores; best for non-technical users if plugin size limits aren’t a problem.
Host-provided migration service New host support or migration form Let the hosting support team perform the move for you, often free with new plans.
Staging to live push Managed WordPress hosting dashboards Design and test on staging, then push to live with one click when ready.
Backup/restore from control panel cPanel full backup & restore tools Move entire accounts between cPanel hosts, including email and multiple sites.

Conclusion: You Can Safely Migrate a WordPress Site to a New Host

You’ve seen how to migrate a WordPress site to a new host using a clear, repeatable process: back up files and database, copy them to the new server, update your configuration and URLs, point DNS to the new host, and test everything before shutting down the old account.

Once you’ve done this WordPress migration once, future moves become much less intimidating. Keep a copy of this checklist, document your host-specific details, and you’ll always have a reliable way to move your WordPress site without unnecessary downtime or surprises.

Frequently Asked Questions About Migrating a WordPress Site to a New Host

Will my site go down while I migrate WordPress to a new host?

If you plan carefully, you can keep downtime close to zero. Set up the site on the new host first, then switch DNS. Some visitors may briefly see the old host while DNS propagates, but your site should stay accessible throughout.

Do I have to move email when I change hosts?

If your email is hosted with your old web host, you’ll need to migrate email or change MX records. If you use third-party email (like Google Workspace or Microsoft 365), you usually just keep your MX records pointed to your email provider and only update web DNS records.

Can I migrate a WordPress site with a plugin instead of manually?

Yes. Many users migrate a WordPress site to a new host using backup/migration plugins. They can simplify the process, but may have size limits or require Pro versions for large sites. The manual method works everywhere and is good to understand even if you use plugins.

How long does DNS propagation take after I switch hosts?

DNS changes can start taking effect within minutes, but full propagation worldwide can take up to 24–48 hours. During that time, some visitors will see the site on the old host and others on the new host.

What if I see the old site even after migrating?

Your browser or ISP may be caching DNS. Try clearing your browser cache, flushing DNS, or using a different device/network. You can also use online tools to confirm which server your domain is currently pointing to.

Is it safe to delete my site from the old host after migration?

Wait a few days after the migration, monitor traffic and errors, and be sure all email and DNS records work as expected. Once you’re confident everything is running smoothly on the new host, you can safely remove the old files and cancel the old hosting plan.

Andreas Weiss

Andreas Weiss is a 47-year-old WordPress specialist who has been working with WordPress since 2007. He has contributed to projects for companies like Google, Microsoft, PayPal and Automattic, created multiple WordPress plugins and custom solutions, and is recognized as an SEO expert focused on performance, clean code and sustainable organic growth.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button