How To Migrate a WordPress Site to a New Host: A Step-By-Step Guide

Jun 24, 2024  | How ToWeb Development

When registering with a WordPress hosting provider, it’s easy to assume you’re choosing your “forever host.”

But what if things change?

What if they’re too slow for your eCommerce or personal needs, or you’re experiencing error after error? It might be time to migrate to a new host – but how?


GIPHY

Don’t worry, we’re here to help!

Read on for a tutorial on how to migrate a WordPress site to a new host and who to call if you need expert help.

But first, let’s cover the basics.

What Is WordPress Migration?

WordPress migration means moving WordPress websites from their current web host to a new web host. This includes moving all your site’s assets, settings, and databases to a new provider with a different hosting server.

Migrating a WordPress website can take some time (especially if you’re moving a domain across, which can take up to 48 hours). Therefore, it pays to keep your customers informed and to follow the most efficient, recommended steps.

When Do You Need to Migrate WordPress Sites?

Many people migrate WordPress sites because they’re unhappy with the service they receive or because they’ve outgrown their providers.

Some hosts’ standards might slip over time, or they might even oversell themselves.

You might need to migrate your WordPress site if:

  • You experience too many errors or frequent downtime
  • Your website speeds are increasingly slow, and it’s the server’s fault
  • You need more memory and support from your provider
  • Your host increased its prices, but performance hasn’t improved
  • You decide you want to move hosting type (e.g., from shared to managed)
  • Hosting customer care falls short of what you expect

If any of the above sounds familiar, it’s time to work out the “how.”

8 Steps to Migrate Your WordPress Site to a New Host

Before migrating your site, make sure you back up your data, ideally with a plugin such as UpdraftPlus.

Now’s a good time to set automated backups so you won’t have to keep saving checkpoints in the future. That way, if anything goes wrong, you can just reload.

If you don’t have time or would simply prefer a developer to handle your migration, StateWP can help. Skip ahead for details!

Migrate WordPress website to a new host: 8 key tips

StepsIn brief
1. Make a pre-migration checklist and complete the tasksThink carefully about the information you want to keep, and use our list of essential checks
2. Pick a method for migrationDecide if you want to migrate via plugin, through your new host, or to do so manually
3. MigrateStart the migration process depending on the route you choose (full details for each are in our guide)
4. Gain local access to your new site and check itAccess WordPress through your new host and give it a test drive
5. Point your domain to your new hostSubmit your new host’s nameservers to your domain registrar (if you’re keeping your old site URL)
6. Wait for DNS, then go live!Wait up to 48 hours for your domain to transfer
7. Delete your old hosting accountWait for around a week for the dust to settle before shutting down your old account
8. Hire a WordPress expert to take care of your migrationContact StateWP to manage your migration completely hands-off

Step 1. Make a pre-migration checklist and complete the tasks

Before starting your site migration to a new host, shop for a reputable service for your hosting plan. We recommend WP Engine as your managed WordPress hosting provider because we use one of its dedicated servers to host our website – and it’s excellent.

Building a pre-migration checklist means carefully considering what data you need to keep and what you might need at the other end of the process.

Here’s a quick checklist of the absolute essentials (that you can, of course, build upon at your own discretion):

  • Collect any relevant information you might need
  • Take a site backup
  • Install an FTP
  • Back up and export your database
  • Install WordPress with your new host
  • Turn on maintenance mode and delete any files or software you don’t need

Let’s break these down.

Collect any relevant information you might need

Start by ensuring you know your site’s login information and any nameservers your new host provides.

For the smoothest migration and best performance with your new host, review your existing files, comments, plugins, and other data on WordPress and remove anything you don’t need.

We recommend you use a plugin such as WP-Sweep to clean up anything that could clog your site before the big move.

Take a site backup

Download a free plugin like UpdraftPlus, access it through your dashboard, and follow the instructions to save a backup or reload point.

Install an FTP client

If you want to migrate your site manually, you need an FTP (file transfer protocol) client such as FileZilla.

Go ahead and download the program for free, and make sure you have login details from your new and existing hosts.

Back up and export your database

You must also download and export your website’s MySQL database, which moves with you. You should be able to do this through your current host, but you can also download and migrate through a cPanel account.

If you’re unsure of what to do at this stage, ask your current host for guidance.

Otherwise, let’s assume you’re backing up your database via cPanel and the service phpMyAdmin. Log into cPanel, and look for “Backup” under “Files.”

Select your database name from the “Download a MySQL Database Backup” section. This saves it to a chosen drive.

Download a MySQ: Database backup screen

But what if you don’t have a database backup yet? Simple. First, select “phpMyAdmin” under “Databases.”

Selecting phpMyAdmin under

Click the database you want to back up, then click “Export.” Tick the “Quick” box, have “SQL” highlighted in the dropdown menu, and click “Go.”

Click the database you want to back up, then click “Export.” Tick the “Quick” box, have “SQL” highlighted in the dropdown menu, and click “Go.”

You should only need the “Custom” option if you want to export specific elements of your database.

Install WordPress on your new host

Many hosts offer one-click WordPress Installation, which makes this step super easy.

Let’s keep using WP Engine as an example.

Log into WP Engine’s user portal and click on “Installs.” Now, select “Add Install” and fill out a few crucial details before clicking “Create Install.”

This prepares your host for a “new” WordPress site and ensures it’s ready for you to migrate into.

Turn on maintenance mode and delete any files or software you don’t need

Before you start a WordPress migration to a new host, you ideally need to put your site into maintenance mode, which tells visitors your site is down temporarily.

If you have the time, we recommend you follow our complete guide to WordPress maintenance mode. If not, here’s a quick summary.

Activating maintenance mode is fastest when using a plugin; for this step, we’re using SeedProd. Feel free to install it with this link.

From SeedProd’s settings window in the WordPress dashboard, select “Landing Pages,” then select “Set up a Maintenance Mode Page” on the following screen.

Then, choose a page template before customizing it in the page builder. Click “Save” when you’re happy.

Then, click “Page Settings” at the top of the page builder. Under “General,” enter a title and select “Publish.”

“Page Settings” at the top of the page builder. Under “General,” enter a title and select “Publish.”

Click “Save” and then “Publish.”

Head to SeedProd and Landing Pages from your WordPress dashboard again and switch the “Maintenance Mode” button from “Inactive” to “Active.”

SeedProd and Landing Pages from your WordPress dashboard again and switch the “Maintenance Mode” button from “Inactive” to “Active.”

Check your current website, and you should see your maintenance page. It stays up until your migration is complete.

Step 2. Pick a method for migration

There are three ways to migrate your site across to your new hosting provider:

  1. Use a duplicator plugin such as All in One WP Migration or Duplicator
  2. Use your new host’s migration tools
  3. Migrate your site manually

The fastest and easiest way to migrate is through plugins or your new host. However, if you’d prefer to keep control of the process, you might want to migrate your site manually.

Step 3. Migrate

Here’s how to migrate a WordPress site through the methods mentioned above.

Use a WordPress migration plugin

We’re using the All-in-One WP Migration plugin to help you migrate here, so download and activate it from the link provided.

Once installed, you should see it in your dashboard’s left-hand panel. Hover over the plugin and select “Export” from the menu.

On the next screen, the plugin helps you download your site as an export file to upload to your new host. Select “Export To” and choose your preferred destination. Once you’re ready, click “Download.”

Now, you need to log into WordPress at your new host.

Once logged into your “new” dashboard on the new host’s side, install and activate the free migration plugin again before selecting “Import” when you hover over it.

Click “Import From” at the next screen or drag your exported website file into the box. You must use the Import From menu if you use Google Drive, FTP, or a source other than your local drive.

“Import From” at the next screen or drag your exported website file into the box. You must use the Import From menu if you use Google Drive, FTP, or a source other than your local drive.

Click “Proceed” at the warning screen and follow the migration wizard’s instructions. At the end of the process, you receive a success message and the option to head to permalinks settings. Click this.

On the permalinks settings page, make sure to scroll to the bottom and click “Save Changes.” Do this twice so that a core file, “.htaccess,” is generated properly.

Use your new host’s migration tools

Let’s use SiteGround as an example of a host that helps you move over automatically.

A quick warning: SiteGround advises this process doesn’t apply to local site installs, moving multiple installations, or migrating from WordPress.com – this is for WordPress.org users.

Start by logging into your SiteGround account and select “Set Up Site” from the middle of the first page:

Then, select whether you’re moving an existing domain across and enter your full URL if so, then select “Continue.” We’ll cover pointing domains to new hosts in more detail later.

select whether you’re moving an existing domain across and enter your full URL if so, then select “Continue.”

On the next page, select “Migrate Website” and “Superfast WordPress Automigration.”

 select “Migrate Website” and “Superfast WordPress Automigration.”

Now, click “Copy” underneath the “Get Migration Token” header.

click “Copy” underneath the “Get Migration Token” header.

Head back to your existing WordPress dashboard and search for the SiteGround Migrator plugin via the plugin search engine.

Now, select the plugin from the left-hand side of the WordPress dashboard, and paste the migration token you copied into the box provided before selecting “Start Migration.”

select the plugin from the left-hand side of the WordPress dashboard, and paste the migration token you copied into the box provided before selecting “Start Migration.”

Migrate your site manually

As mentioned earlier, you can export your site’s database by following the cPanel export process through phpMyAdmin.

You now need to export the files from your old website to your new website. To do this, open FileZilla and log in with FTP credentials from your existing host (you can also use File Manager, but we recommend an FTP for ease of use).

Once logged in, open the folder marked “public_html” and select all the files within before right-clicking to select “Download.”

Once your WordPress files are downloaded, check that important files and folders such as your .htaccess.php, wp-admin, wp-includes, wp-content, and .wp-config.php files are present.

Open the folder where you downloaded the site files and compress them into a single .zip. This option should be available after you select all the files and right-click.

Now, log out of FileZilla with your old credentials and log back in with your new details.

Find “public_html.” In this folder, open “wp_config.php,” and make a note of the details supplied under the lines “DB_USER,” “DB_PASSWORD,” and “DB_NAME.” You need to reuse these details after uploading the new files.

Now, delete all the content within public_html. Then, upload your .zip file into this folder and extract it.

You must now import your existing database to your new host via “phpMyAdmin.” If you use WP Engine, for example, you can access “Sites” in your user control panel and then “phpMyAdmin” toward the top of the page.

Select the correct WordPress database on the left. It should start with “wp_” like so:

Select the correct WordPress database on the left. It should start with “wp_”

Now, you need to remove the new database’s tables. Tick the “Check All” box, select “Drop” in the menu that appears, and then click “Go.”

Tick the “Check All” box, select “Drop” in the menu that appears, and then click “Go.”

On the next page, click “Yes” to confirm you’re happy to move ahead.

Now, toward the top of the screen, select “Import,” then find “Choose File,” and select the database you saved from cPanel earlier. Click “Go.”

This now populates the tables you emptied with your existing site data!

WP Engine also advises checking if your tables start with the prefix “wp_.” Otherwise, they might not function correctly with your host. If this is the case, make sure to contact your host or a WordPress developer for help.

Now, head back to FileZilla and open “wp-config.php.”

Look for lines in the code that start with DB_USER, DB_PASSWORD, and DB_NAME. You need to add credentials from the version of wp_config you opened earlier. If you don’t have these details, contact your host.

Step 4. Gain local access to your new site and check it

Once you’re migrated, before you start pointing your domain to your new location, check how the local version of your site looks and make sure it performs as you expect it to.

The easiest way to do this is to log into your WordPress site with your new host and access their local version.

For example, using their migrator tool, SiteGround offers a temporary URL to check your site before you fully transfer the domain.

You can also map domain names to specific IP addresses to “trick” your computer into showing you content from your new host before you migrate – however, this is a complex process that beginners and intermediate users should avoid. Stick to your new host’s migrator tools.

Step 5. Point your domain to your new host

You don’t have to transfer your domain to your new host, but if you already have plenty of customers used to your existing URL, it’s usually quicker and easier to keep things the same.

Pointing a domain is fairly simple regardless of the host you move over to. You need to find your host’s name servers and provide them to your domain registrar.

SiteGround’s host name servers, for example, are ns1.siteground.net and ns2.siteground.net.

For other hosts, such as WP Engine, you usually need to log into your user portal and look for DNS details under “CNAME” and “A NAME.”

Once you have name server details, head to your domain provider. Let’s use Domain.com as an example.

Log into your Domain.com user account and look for “DNS & Nameservers.”

Ensure you’ve selected the domain you wish to configure, and then scroll down to find “ns1” and “ns2” domains. Click the “three dots” symbols next to “ns1” to start.

select the domain you wish to configure, and then scroll down to find “ns1” and “ns2” domains. Click the “three dots” symbols next to “ns1” to start.

Enter the new name server in the “Content” box and click “Update DNS.” Repeat this process for ns2.

Enter the new name server in the “Content” box and click “Update DNS.” Repeat this process for ns2.

Step 6. Wait for DNS, then go live!

Unfortunately, you now have to play a little waiting game.


GIPHY

It can take up to 48 hours for your domain to fully switch to the new servers you entered, so sit tight.

If you’re moving to a new domain, ensure your website is free from any mentions or links to your old domain with the “Better Search Replace” plugin.

Once installed, access the plugin via “Tools” in your dashboard. In the search box provided, type in your old URL, with your new domain in the “Replace with” box.

Now, select all the available database tables, and choose “Run as dry run.” Then, select “Run Search/Replace.” This lets you preview the results.

If you’re happy, repeat again with the dry run box unticked.

You can check if your DNS has finished processing with the free “What’s My DNS” tool.

Step 7. Delete your old hosting account

Once you’ve successfully migrated, you must delete your old hosting account. But don’t be too hasty.

There’s still a chance there might be teething errors when migrating your site. For good measure, we recommend deleting your old host account around a week after migration in case there’s something wrong with your new host account, and you need to restore the original.

Step 8. Hire a WordPress expert to take care of your migration

You know what? You can cut out all the above by asking an expert to take care of the migration for you.

That means a seamless transfer to your new host without you having to click around, look for answers to complex questions, and potentially negatively affect your site’s search engine optimization (SEO) and traffic.

StateWP offers hosting migration as part of our Starter tariff, available from $159 per month when purchased annually.

We take control of your migration from end to end and even suggest a few recommended hosts if you’re unsure of the best package for your needs.

Request submitted via Proto inquiring about host migration

Through the Proto dashboard, you can stay in touch with StateWP devs, track migration status, and ask questions along the way. We aim to get you up and running on a new host within 3-7 days.

Contact us to learn more and start moving across 100% hassle-free.

Migrate Your WordPress Site with Ease

You might not need to migrate a WordPress site to a new host right now, but things can change!

If you’re stuck with a slow, unresponsive host offering you barely enough memory to get by, who could blame you for wanting to switch?


GIPHY

Thankfully, there are a few different ways to migrate your WordPress site and all its data to a new host, and it’s often relatively straightforward.

However, if you’d prefer some of the best WordPress developers to help you move to your new provider, StateWP can be on hand to help. Sign up as a partner, and let us handle the whole process for you.

In the meantime, ensure your site’s as speedy as possible after your move with our tips on how to speed up your WordPress site.

WordPress Migration FAQs

Let’s close with some commonly asked questions about WordPress migration.

Can I move my WordPress site to another host?

Yes – you can migrate WordPress to new hosting either by using a plugin such as Duplicator, by following your new host’s migration service, or by manually moving files across. Look at all three options in detail in our complete WordPress migration guide.

How to migrate a WordPress site to a new host without plugins?
  1. Download an FTP client
  2. Log in with your old host and download all the host files, then zip them
  3. Log into phpMyAdmin with your current host and export your database
  4. Log back into FTP with your new host’s details
  5. Open and copy “DB” details from wp-config.php
  6. Delete public_html files
  7. Extract old files into the folder
  8. Log into your new host’s user portal and erase database tables
  9. Upload your old database
How do I easily migrate my WordPress site?
  1. Download a WordPress migration plugin such as Duplicator or All-In-One
  2. Follow the instructions to export your files and upload them to your new host
  3. Alternatively, follow your new host’s migration process, such as WP Engine’s plugin system
  4. Finally, if you’d prefer someone to help you, ask a WordPress developer for support
Can I keep my domain name when I change a host?

Yes, you can keep your domain name when you move host, but you might need to unlock it with your domain provider. Contact your domain registrar or provider directly to unlock your domain. Then, check your domain server details with your new host, and provide these to the domain registrar. You should retain your domain within 48 hours.

How long does it take to transfer a website from one host to another?

Transferring your website from one host to another can take hours to days, depending on what you need to plan for and move across. However, it’s fast and easy to move even large sites when you use the right plugins or ask for help from experts. Our guide explores a few ways to transfer your site from one host to another.

x