How to Migrate Your WordPress Site to a New Host (Step-by-Step Guide 2026)

TL;DR: To migrate your WordPress site to new hosting, back up your files and database, transfer them to the new host, update your wp-config.php if needed, then point your DNS to the new server. Using a plugin like UpdraftPlus or All-in-One WP Migration makes the process faster and safer than doing it manually — most sites move in under two hours with zero downtime.

Last Updated: September 2026. Tested with WordPress 6.7, PHP 8.3.

Switching hosting providers is one of the most common (and most nerve-wracking) tasks a WordPress site owner faces. Whether your current host is too slow, too expensive, or keeps going down, knowing how to migrate your WordPress site to new hosting correctly is the difference between a smooth cutover and hours of broken pages, lost data, and angry visitors.

This guide walks through every step in the right order: backing up, transferring files and the database, configuring the new environment, updating DNS, and verifying everything works before you flip the switch. It covers both plugin-based migration (the easier route) and manual migration (when you need full control).

What You Need Before You Start

Try GigaPress AI Free →

Before touching anything on your existing site, gather these items. Skipping prep work is how migrations go wrong.

  • Login credentials for your current hosting control panel (cPanel, Plesk, or similar)
  • Login credentials for your new hosting account
  • Access to your domain registrar (where your DNS is managed)
  • FTP or SFTP client such as FileZilla (free, actively maintained)
  • A database management tool — phpMyAdmin is available in most shared hosting control panels
  • At least 30–60 minutes of low-traffic time, or a maintenance window if your site is high-traffic

You should also know the size of your site. Sites under 500 MB work perfectly with free plugin options. Sites over 1 GB may require manual transfer or a premium plugin tier that handles large files without timing out.

Step 1: Back Up Your WordPress Site Completely

A full backup is your safety net. Never begin a migration without one — if anything goes wrong during the transfer, you need to be able to restore from a clean snapshot taken immediately before you started.

Your backup needs to include two things: all WordPress files (the wp-content folder contains your themes, plugins, and uploads) and a complete export of your MySQL database (which holds every post, page, setting, and user account).

Option A: Back Up with UpdraftPlus

UpdraftPlus is one of the most widely used WordPress backup plugins, with over three million active installations on WordPress.org. The free tier handles complete file and database backups.

  1. Install and activate UpdraftPlus from the WordPress plugin repository.
  2. Go to Settings, then UpdraftPlus Backups.
  3. Click Backup Now. In the popup, confirm that both “Include your database in the backup” and “Include your files in the backup” are checked.
  4. Wait for the backup to complete. For most sites this takes two to ten minutes.
  5. Download the backup files to your local computer by clicking the Download buttons next to each component (Database, Plugins, Themes, Uploads, Others).

Option B: Back Up with All-in-One WP Migration

All-in-One WP Migration packages your entire site into a single .wpress file, which makes it straightforward to import at the destination. The free version supports sites up to 512 MB without extension.

  1. Install and activate All-in-One WP Migration.
  2. Go to All-in-One WP Migration, then Export.
  3. Click Export To, then File. The plugin bundles everything and prepares a download link.
  4. Download the .wpress file to your local machine.

Step 2: Set Up Your New Hosting Account

Log in to your new host’s control panel and complete these tasks before transferring any files.

  • Create a new database and database user. In cPanel this is under MySQL Databases. Note the database name, username, and password — you will need these in a later step.
  • Create an FTP or SFTP account, or note the credentials provided by your host.
  • Confirm which PHP version the new host runs. WordPress 6.7 requires PHP 8.0 or higher; PHP 8.3 is recommended for performance and security in 2026.
  • If your new host offers a temporary URL (sometimes called a staging domain or a “preview” URL), note it — it lets you verify the site works before you touch DNS.

Some hosts, including those listed on the WordPress recommended hosting page, will auto-provision a fresh WordPress install. If that happens, you can delete the default files before your import, or the migration plugin will overwrite them.

Step 3: Transfer Files and Database to the New Host

This is the core of how to migrate a WordPress site to new hosting. Choose the method that matches how you backed up in Step 1.

Plugin Method: All-in-One WP Migration Import

  1. Install WordPress on the new host (a clean install is fine).
  2. Install and activate All-in-One WP Migration on the new install.
  3. Go to All-in-One WP Migration, then Import.
  4. Upload the .wpress file you downloaded in Step 1. For large files, increase the upload limit first by adding @ini_set('upload_max_size', '512M'); to wp-config.php, or use the plugin’s FTP import option.
  5. The plugin overwrites the database and files. When it finishes, it prompts you to log in with your old credentials.
  6. After logging in, go to Settings, then Permalinks, and click Save Changes twice. This regenerates the .htaccess rewrite rules on the new server.

Plugin Method: UpdraftPlus Restore

  1. Install WordPress on the new host.
  2. Install and activate UpdraftPlus on the new install.
  3. Go to Settings, then UpdraftPlus Backups, then the Existing Backups tab.
  4. Click Upload backup files and upload each component file you downloaded earlier.
  5. Once all files appear, click Restore, select all components (Database, Plugins, Themes, Uploads, Others), and proceed.
  6. UpdraftPlus will restore the site. Log in with your old credentials when prompted.

Manual Method: FTP plus phpMyAdmin

Manual migration gives you the most control and works for any site size. It takes longer but has no file size limits.

  1. Connect to your old host via FTP/SFTP and download the entire WordPress root directory to your local machine. This includes wp-admin, wp-includes, and wp-content.
  2. Export the database from your old host using phpMyAdmin: select your database, click Export, choose the Quick method, and download the .sql file.
  3. Connect to your new host via FTP/SFTP and upload all WordPress files to the public_html (or equivalent) directory.
  4. Import the .sql file into the new database via phpMyAdmin on the new host: select the empty database you created, click Import, and upload the .sql file.
  5. Open wp-config.php in a text editor and update these three lines to match the new database credentials:
    define('DB_NAME', 'new_database_name');
    define('DB_USER', 'new_database_user');
    define('DB_PASSWORD', 'new_database_password');
  6. If the new host is on a different server IP, also confirm the DB_HOST value — most shared hosts use ‘localhost’, but some use a specific IP address or socket path.

Step 4: Test the Site on the New Host Before Changing DNS

Changing DNS before you confirm the site works is the most common migration mistake. Test first using one of these methods.

Using the Hosts File

The hosts file on your local machine lets you tell your own browser to resolve your domain to the new server’s IP address, while the rest of the internet still sees the old host. This is the most reliable preview method.

  1. Find your new server’s IP address in your new host’s control panel.
  2. On macOS or Linux, open Terminal and edit /etc/hosts with sudo privileges. On Windows, edit C:WindowsSystem32driversetchosts as Administrator.
  3. Add a line: 123.456.789.000 yourdomain.com www.yourdomain.com (replacing the IP with your actual new server IP).
  4. Save the file and open your browser. Your domain now resolves to the new host for your machine only.
  5. Browse through your site: check the homepage, interior pages, images, forms, and the wp-admin login.
  6. When satisfied, remove the hosts file entry to restore normal DNS resolution.

Using a Temporary URL

If your new host provides a temporary preview URL, navigate to it directly. You may see broken styles because WordPress hardcodes the site URL in the database, but you can verify that pages load and the admin panel responds. This is enough to confirm the files and database transferred correctly.

Step 5: Update DNS and Point Your Domain to the New Host

Once you have confirmed the site works on the new server, update your DNS records at your domain registrar.

  1. Log in to your domain registrar.
  2. Find the DNS management panel for your domain.
  3. Update the A record for the root domain (@) to point to your new host’s IP address.
  4. Update the A record for www to the same IP.
  5. If your new host uses nameservers instead of an A record, update the nameserver (NS) records to the values provided by your new host.
  6. Save the changes. DNS propagation typically takes between 15 minutes and 48 hours, though most resolvers update within two to four hours in 2026.

Keep your old hosting account active for at least 48 hours after updating DNS. Do not delete the old account until propagation is complete and you have verified your live site.

Step 6: Verify the Migration Is Complete in 2026

After DNS propagates, run through this final verification checklist on your live domain.

  • Homepage loads correctly with all styles and images.
  • Internal links and navigation menus work.
  • Contact forms submit successfully (send a test submission).
  • SSL certificate is active — the browser shows a padlock and the URL begins with https://. Most hosts provide free Let’s Encrypt SSL; if yours does not auto-provision it, install it from your control panel.
  • WordPress admin (yourdomain.com/wp-admin) is accessible and functional.
  • Run a Google Search Console crawl request to notify Google of the site’s new location. If you changed URLs as part of the migration, set up 301 redirects from old URLs to new ones.
  • Check that your caching plugin (WP Rocket, W3 Total Cache, or LiteSpeed Cache) is flushed and working on the new server.

For detailed guidance on migrating to a managed environment specifically, see the guide on how to migrate WordPress to managed hosting without downtime. For a zero-downtime-focused walkthrough, the post on how to migrate WordPress to a new host with zero downtime covers DNS TTL reduction and other advanced techniques.

Common Migration Errors and How to Fix Them

Even careful migrations hit snags. Here are the most frequent issues and their solutions.

Error Most Likely Cause Fix
White screen / blank page PHP error or plugin conflict Enable WP_DEBUG in wp-config.php, check error logs
Error establishing database connection Wrong DB credentials in wp-config.php Re-enter DB_NAME, DB_USER, DB_PASSWORD, DB_HOST
Broken images or missing styles Hardcoded old URLs in database Run Search and Replace on the database (wp-cli: wp search-replace 'oldurl.com' 'newurl.com')
Redirect loop SSL or .htaccess misconfiguration Flush permalinks; check .htaccess for duplicate rewrite rules
502 Bad Gateway after migration PHP-FPM or memory limit issue on new host See the WordPress 502 Bad Gateway fix guide
Admin login loops back to login page Cookie domain mismatch Add COOKIE_DOMAIN and SITECOOKIEPATH constants to wp-config.php

Manual vs. Plugin Migration: Which Should You Use?

Method Best For Skill Level Time Required File Size Limit
All-in-One WP Migration (free) Sites under 512 MB, beginners Beginner 30–60 min 512 MB free
UpdraftPlus (free) Any size, familiar with WP admin Beginner to Intermediate 45–90 min No limit (free tier)
Manual FTP + phpMyAdmin Large sites, developers, full control Intermediate to Advanced 90–180 min No limit
Host-provided migration tool Accounts already at receiving host Beginner Varies Host-dependent

For most site owners migrating a personal blog or small business site for the first time, All-in-One WP Migration or UpdraftPlus are the right tools. Manual migration is worth learning if you manage multiple sites or need to migrate databases too large for plugin upload limits.

For further reading on the WordPress platform itself, the WordPress Developer Resources documentation covers wp-config.php constants, WP-CLI commands, and database table structure in detail.

After the Migration: Consider Whether Another Move Is Worth It

If you just survived a difficult migration, you may be wondering whether there is a better path forward. Manual migration is genuinely time-consuming, and the more complex your site gets (more plugins, custom code, large media libraries), the harder the next one will be.

One alternative worth knowing about: managed WordPress hosting provisions your server environment automatically, handles WordPress core updates, and eliminates the need to manage PHP versions, database credentials, or .htaccess files manually. If you are rebuilding or launching a new site rather than just moving an existing one, that changes the calculus further.

You can also read about what makes a good WordPress hosting choice before committing to your new provider, so this migration is the last one you need to do for a long time.

Want a Pro WordPress Site in Minutes?

GigaPress AI builds you a full WordPress site in about 15 minutes — AI handles layout, styling, content, and images. Free to design, only pay when you’re ready to go live. If you just finished a painful migration and never want to do another one, GigaPress AI provisions managed WordPress automatically, so your next site launch skips the manual setup, the database credential juggling, and the DNS anxiety entirely.

Frequently Asked Questions

How long does it take to migrate a WordPress site to a new host?

Most migrations take between 30 minutes and three hours, depending on site size and the method used. A small blog under 200 MB with a plugin like All-in-One WP Migration can be done in under an hour. Larger sites migrated manually via FTP and phpMyAdmin typically take two to three hours, not counting DNS propagation time (which can be up to 48 hours).

Will my site go down during the migration?

Your site does not have to go down during migration. The key is to complete the file and database transfer, verify the new host is working correctly, and only then update your DNS. While DNS propagates, both the old and new hosts are serving files, so visitors are unlikely to notice any disruption. Setting your DNS TTL to a low value (300 seconds) about 24 hours before the move reduces propagation time significantly.

Do I need to reinstall WordPress on the new host before migrating?

It depends on the method. All-in-One WP Migration and UpdraftPlus both require a working WordPress install on the new host to run the import process. Manual FTP migration does not — you upload the files directly without a pre-existing install. Either way, the migration overwrites the default WordPress files and database, so any content the new host auto-created is replaced.

What happens to my email if I change my DNS nameservers?

If your email is hosted on the same server as your website (using cPanel mail, for example), switching nameservers to a new host will break your email unless you also move the mail service or configure the MX records correctly on the new host. To avoid email disruption, either keep your email on the old host by migrating only the A record (not the nameservers), or set up the same email accounts on the new host before updating nameservers.

Is there a free way to migrate a WordPress site without plugins?

Yes. The manual FTP plus phpMyAdmin method described in this guide is completely free and requires no plugins. You need an FTP client (FileZilla is free and open source), access to phpMyAdmin on both hosts (standard in most shared hosting control panels), and a text editor to update wp-config.php. The tradeoff is time and technical comfort level compared to using a migration plugin.

Similar Posts