There are times when you will need to migrate a WordPress website to a new host or a different server. Perhaps you want to change a website’s structure, optimize it for mobile or you may just be dissatisfied with your current server’s service and performance.
Migrating can solve your problem and go smoothly – as long as you take the necessary steps to avoid data loss and downtime. Like any project, understanding what to do before jumping in is key. Here’s what you need to know:
How to know when it’s time to switch WordPress hosts
The first step when switching WordPress hosts is to recognize the signs that it’s the right time to switch. Since moving providers can be daunting, it’s important to be sure you’re making the right decision for your business, or for your clients.
These are the main reasons you might want to look into switching to a new WordPress host:
1. Your site is often down when you aren’t expecting.
Unexpected downtime is bad for business, and frequent drops in traffic can also affect your search rankings. If your site is going down multiple times each month, it’s a clear indication you need to switch to a new host.
2. Your current host is too slow.
Having a fast and responsive site is an important factor when optimizing your site for higher search rankings and providing a better user experience. If your site continues to load slowly after disabling unnecessary WordPress plugins, a new host might be the right solution.
3. Your current host’s customer support is poor.
When your site is down, the last thing you want is to hear that customer support can’t help you. If your host’s support team is slow to respond, difficult to reach, or they simply don’t know how to help, it’s time to move on.
4. Your current host is missing key features.
Say you’re looking to add e-commerce functionality to your WordPress site, but your host doesn’t support WooCommerce. Rather than trying to set up and manage the software yourself, it’s easier to find a host that manages that functionality for you.
5. Your current host doesn’t back up your site automatically.
Having a frequent backup of your site is critical—without one, recovering your site can be slow and painful, if not impossible. If your current host doesn’t provide frequent backups of your site for you, it might be time to say goodbye.
6. You have to install WordPress updates yourself.
Most managed WordPress providers should automatically install WordPress core updates and security patches for you. If your current host makes you manage this on your own, you can save time and reduce risk by switching to a managed WordPress host instead.
It’s important to note that every provider will have some things you’re happy with, and other things you don’t like. While you might be able to live with one or even two of these red flags, if more than two of the above items are affecting your sites, or if one or more problems keep coming up over and over, that’s a clear sign it’s time to find a new web hosting provider.
What to do before you migrate a website
As with any web project, success starts with advance prep. So, what should you do before you migrate a website? Before you roll up your sleeves and get started, follow these three steps:
The size of your database will determine how quickly your migration will happen. No matter if you have a mega ecommerce site or a site with only a few plugins, take the time to make your file and database size as small as possible. You can do that by removing all backups, cache directories from old plugins, unused themes, plugins and videos.
Next, do some advance prep. You don’t want to lose orders, visibility or functionality. Take these steps:
- Take inventory of all the content so you have a checklist of everything that must migrate from point A to point B. If you identify content that does not need to migrate, eliminate it. You want to transfer only the content that is current.
- Note your current themes. Review your theme files and note any additions you made to code.
- Take inventory of your network resources and configurations including IP information, domain names, firewall access control lists, internal and external DNS entries.
- Contact the provider who issued your SSL certificate to understand the terms and conditions related to migrating your site.
- Understand the size of your website. Some are too big (over 1GB) to manually or automatically migrate. Rather than guessing based on size of tables, number of posts or inventory of orders, export a compressed SQL file to understand the actual size of your database. For large databases, plan on migrating using SSH commands.
Are you migrating a large ecommerce site? Take some extra steps to make sure your product data, customer data and order histories transfer. Organize all your user, product and catalog data and highlight what should be migrated.
Finally, as part of your preparation, enable a maintenance page that will provide a user-friendly message to users with alternative links to visit when the site is undergoing migration.
Step 1: Back up your website files
Backup is important because if you run into a problem during migration — like corrupted or missing files — you’ll be able to restore that data from your backup.
Start by retrieving your website files from the original host. You can use file transfer protocol (FTP) to download them to your local computer. Then, log in to your web host and copy all of the files from your website’s root directory to a folder on your local computer.
Step 2: Export the database
Once the transfer is complete, you can move on to copying the database. The database is the most important piece of your WordPress site — it’s the brain that holds all of your pages and posts.
Similar to the file backup, you will start by making a copy of the database. Most hosts offer access to a database through phpMyAdmin. To copy the database:
- Log in to your host control panel and access phpMyAdmin.
- Select your website’s database from the left column and then click Export from the top menu bar. The export method should default to Quick, which is acceptable for these purposes. You’ll also want to make sure that the format is SQL. This will ensure that your backup is universally acceptable for MySQL.
- Click Go, and you’ll be prompted to download the .sql file. Move this file into the same folder as your website to keep track of it while you complete the migration.
When migrating your client’s WordPress site, be aware of database size. Database export or import might fail due to database size. Some big databases can only be imported via SSH. You should check your customers’ database size, which one is the biggest table, how many posts there are, and how many orders for WooCommerce installations. The answers to these questions can determine if your client’s site is a good fit for the hosting which you are trying to migrate it to.
How to choose a new WordPress host
When you’re choosing a new managed WordPress host, it’s critical to make sure you pick the right balance of features and service—after all, the last thing you want to do is be switching hosts again only a few months down the road!
There are a lot of benefits when choosing managed WordPress hosting over regular hosting:
- Most managed WordPress providers will offer to migrate your WordPress sites for you — GoDaddy included.
- Many providers will automatically install commonly used plugins for you, such as WooCommerce or Yoast SEO.
- A lot of managed WordPress hosting plans include a free staging site, making it easier to test out changes to your sites without affecting the live site.
- WordPress core updates, security patches, and even some plugin updates are managed automatically for you.
- Managed WordPress hosts will regularly back up your site, and make it easy to quickly roll back your site to a prior backup if needed.
- Having a dedicated WordPress customer support team ensures you can always get a hold of someone who can fix your problems.
Of course, we’d always recommend choosing GoDaddy Managed WordPress for your hosting needs—with simple installation and migration, pre-loaded themes, automatic updates, and award-winning customer support, GoDaddy makes it easy to get your WordPress site up and running.
Now that you’ve chosen your host, it’s finally time to get the migration started!
Choosing between a manual site migration or an automatic site migration
Now you can continue to the next step and decide if you want to migrate your website manually or automatically.
Manual migration is just what it sounds like: copying and pasting your existing website data by hand. With a manual migration, you will need to be comfortable accessing databases, transferring them and then editing the wp-config.php file. You can do it all through the file manager on your hosting control panel or you can use an FTP client. If you choose manual migration, keep in mind the pros and cons:
- You can review the content during the entire process. You’ll be able to ensure each piece of content is placed and linked correctly as you migrate it.
- Manual migration is not suitable for large sites.
- You will need some experience in coding.
- Manual migration can take up a lot more time compared to automatic migration.
- Manual migration leaves more room for human error. You will need to build in extra time for testing and verification after migration.
For an automated WordPress migration, you use custom applications, extensions developed by CMS platform vendors or universal migration tools that will move all your website data from one platform to another. If you choose automated migration, keep in mind the pros and cons:
- Automated WordPress migration is an efficient method for large sites.
- You do not need coding skills to do automated migration.
- Compared to manual migration, automated migration is much faster.
- Even though most hosts offer free migration, sometimes there is a cost associated with purchasing or developing the tools needed to automate migration.
- No matter if you do an automated or manual migration, customized data or content may not migrate depending on the tool used.
For either process, you will need to select a plugin, a software add-on that gives you the functionality to do a migration. Options abound, but you may want to check GoDaddy’s free migration on Managed WordPress, or select the free Duplicator or All-in-One WP Migration tool. For either, you simply set up the plugin and use the Import function.
How to automatically migrate a WordPress site
If you choose to automatically migrate your WordPress site, be sure to have the new site’s login details including username and password as well as the link to the old site. There are many plugins and tools that you can use to do it, such as:
Many hosts also offer easy automated migrations.
With Managed WordPress by GoDaddy, you can just enter your WordPress site and credentials to get your site migrated.
- Go to the GoDaddy product page, in the Managed WordPress section, select Manage All.
- Next to Managed WordPress, select + Create Site.
- From the list of Your existing plans, select the Managed WordPress plan you want to use for the site you're moving, and then select Next.
- Select Migrate an existing WordPress site.
- Fill out the remaining fields to get your site migrated.
- It may take a while before the migration is completed, larger and more complex sites could take more time. We'll send an email when we're finished migrating your site.
How to manually migrate a WordPress site
If you choose to manually migrate your WordPress site, you can follow different approaches, let's first focus on migrating a site with the help of a plugin.
How to migrate a WordPress site with Duplicator
1 - Prepare your old WordPress site for migration
Let's pack up the old site so that it can be migrated. To do this, we’ll be using a free WordPress plugin called Duplicator. The plugin makes it easy to pack up your existing site, and also to unpack it on the new provider.
To install the Duplicator plugin on your old host, navigate to Plugins > Add New and type “Duplicator” into the search bar. Once you find the right plugin, click Install Now, and then activate the plugin once it’s installed.
2 - Package up your old WordPress site and database
Now that you’ve installed Duplicator, you can use it to package up your site for moving it to a new host.
To get started, go to Duplicator > Packages, then click Create New in the top right-hand corner.
On the next screen, you’ll see a few options for creating the package. While you do get some additional options as part of the Duplicator Pro package, such as cloud storage for backups and a branded installer, most sites can make do with the default settings.
Click Next to run a scan of your site and ensure it’s ready to pack—the scan should only take a few seconds. At this point, the plugin will warn you if you have any issues that might affect the migration of your site, such as an unsupported server setup or any enormous files.
If any errors come up, you can check the FAQ page for the plugin for more information on how to resolve the issues before running the scan again.
If everything looks good and your site checks out, click Build to start creating the migration package. Depending on the size of your site, it might take several minutes for the build to complete.
After the build is done, you’ll see two buttons, the first to download the installer and the second to download the site archive. There’s also a convenient One-Click Download link below the buttons—save yourself a few seconds and click that link, saving the files somewhere convenient.
3 - Create the MySQL database and user on the new host
This step assumes you’re moving to a vanilla web host without a managed WordPress offering. If your provider offers managed WordPress hosting, it’s much more convenient to have your provider take care of the migration for you.
While the Duplicator installer can install WordPress for you on the new host, you still need to manually create the database and set up a new user, since the plugin can’t do that on its own.
If your new host offers cPanel access, you can quickly set up the new database and user from within cPanel. (Here are instructions for how you can set up the database on GoDaddy’s cPanel hosting.)
If your new host doesn’t offer cPanel access, you should be able to find instructions for creating the database in their support documentation.
When you create the database, make sure to give it a memorable name, since you’ll need to enter it into the Duplicator plugin later. It can help to prefix the database name with “wp_” so you remember it’s a WordPress database, especially if you have multiple databases on the same server.
Make sure you also record the new username and password somewhere secure, as we’ll also need those when we set up the new site within the Duplicator plugin.
Finally, make sure the new database user has all privileges assigned for the database you’ll be using.
OK, time for the next step—installing the site on the new host!
4 - Import the WordPress site to your new host
Next, you’ll need to upload both the installer and archive files you downloaded from Duplicator earlier to the root folder on your new host. Make sure the root folder is completely empty, then upload the files using the File Manager in cPanel or using FTP
Once the files are uploaded, you’ll need to access the installer.php file in your browser to start the installation process. There’s one caveat, though: your domain is still pointing to the site on the old host, so you’ll need to access the new site directly via its IP address. If your site is on a shared hosting provider, you’ll also need to include your username in the address as well.
In cPanel, find the IP address of the new server, along with your username. In your browser, enter the IP address of the server, followed by “~username/installer.php”. Be sure to replace username with your user name, marked in red in the screenshot below.
The address bar should look something like this: http://18.104.22.168/~myusername/installer.php
When you make it to the installer, the first step will run some checks on the new host to ensure the archive can be installed properly. If everything shows a pass, then click Next to continue to the next step.
On the next screen, type in the name of the database you created earlier, along with the database username and password. Most of the time, you can leave the host as localhost. Click Test Connection, and hopefully, you should see two Success messages, showing that the server is connected and that the database has been found.
Assuming everything checks out, click Next to continue the installation, then click Yes in the confirmation dialog that appears to begin the deployment. The database will be installed, which will take a few minutes.
On the next screen, you should see the path to the files and database for the new installation. This is where the Duplicator plugin really comes in handy—it modifies the contents of the WordPress database to match the new database name, file locations and domain name, so you don’t have to change them manually.
If you’re changing to a new domain name as part of this process, go ahead and type in the new domain name in the New Settings boxes. Even if you’re keeping the same domain, you might need to re-type the old domain, since the plugin sometimes detects the IP address of the site instead.
Once you’ve entered all the details, click Next. If everything has gone according to plan, the final screen should not be showing any errors, and should give you some suggestions for tests to run on the new host.
That’s the difficult part finished – give yourself a high five!
5 - Double check your files on the new host
At this point, it’s a good idea to double-check that all your files have been migrated properly to the new host before deleting anything from the old host or canceling your account.
Using the File Manager in cPanel or your FTP software, ensure all the files on the new host match the files on the old host. If you spot a few extra files on the new host from the installation process, they can be safely ignored. If you happen to spot anything that’s missing, simply transfer the file over manually using cPanel.
6 - Update your DNS records to point to the new host
Once you’ve checked all your files have transferred properly, you’ll need to update your domain name to point at the new host. The exact method of updating your DNS records varies by DNS provider, so it’s best to look up specific instructions in your provider’s support documentation.
On the new host, follow the instructions to add your domain to the new account. After linking the domain to your account, you should be provided with two or more name server addresses to point your domain name to. Add those name servers to your existing DNS host, making sure to completely clear out the old addresses.
Remember, any changes to your DNS records could take up to 48 hours to propagate throughout the world. If you just can’t wait to get started on your new site, be sure you’re able to access the new site on your existing domain before making changes!
7 - Test everything thoroughly
Once the migration is complete, it’s time to make sure everything’s working as expected on the new host.
First, it’s helpful to verify that the DNS changes have updated, and you’re definitely updating the new site instead of the old site. One way to do this is to upload a file using WordPress’s Media Manager, then try to find the file you uploaded using the File Manager in cPanel on the new site. Once the file shows up you can start making changes, confident that you’re updating the new site.
Once the new WordPress site is up and running, it’s important to make sure your permalinks to your posts and pages are updated. In WordPress, go to Settings > Permalinks, and click Save (you don’t need to change anything else on this page). This makes sure all the permalinks are refreshed to match the new host, since they sometimes get messed up during a migration.
After refreshing the permalinks, navigate around your site, clicking on every page, post, and link you can. Look for missing images, broken links, and other signs that things might be broken. If you find any problems, be sure to fix them in WordPress.
Also, be sure to delete the installer and archive files from the Duplicator plugin, since they can pose a security risk. The Duplicator plugin makes this fairly straightforward—simply click Security Cleanup in the final step of the installer to delete those files. You can also delete the files manually using cPanel.
Last but not least, be sure to cancel your account with your old hosting provider, so you don’t get charged twice.
Give yourself a pat on the back—you’re done!
Migrating a WordPress site without plugins
You could also migrate your entire site without using any plugins. Follow these steps:
- Step 1: To upload your website files, log in to the destination account using FileZilla and browse to the web root of the destination hosting account. If you are using cPanel, this is typically the public_html/ folder. Then, drag your website files from your local computer to the new host’s web root. Depending on the size of your uploads folder and plugins, this process may take some time.
- Step 2: Create a database in the new destination by logging in to the destination account’s control panel. If you are using cPanel, you are looking for the option MySQL® Databases. Create a new database and name it appropriately for your site.
Once you’ve created the database, create a new database user and then add the new user to the new database with ALL PRIVILEGES. Make sure to write down the database name, username, and password — you’ll need them for later.
- Step 3: Import the database by logging in to phpMyAdmin on the destination account and click on the name of the new database that you just created. Then on the top bar click Import. Click the browse button and select your .sql file that you made earlier. Click Go, and the database will begin importing. Depending on the size of your site, this process might take some time to complete.
- Step 4: Next, fix the wp-config.php file to meld the files and database. You can edit this file in FileZilla by right-clicking on it and selecting Edit (cPanel also provides a file manager where you can make edits to this file). What you’re looking for are the following settings in this file:
define('DB_NAME', 'new_db'); define('DB_USER', 'new_db_username'); define('DB_PASSWORD', 'new_db_password'); define('DB_HOST', 'localhost');
Take the database information that you wrote down earlier and replace the old database information in these lines of code with the new credentials.
What to do after migrating a website
So, what should you do after migrating a website?
At this point, your website should be in working order if the domain has remained the same during the move and DNS is already set up. But if you need to do a domain change, the site URL and home URL will need to be changed to reflect the new domain.
You can do this temporarily by adding the following lines to your wp-config.php file with your domain replacing the text “example.com”:
If you don’t want to add temporary domains, you can use a host file to preview your client’s website on a new hosting before going live with DNS change. You can do this by adding entries to the host's file on your local computer.
You should also do a general “find and replace” to find all instances of the old URL. Often, these URLs end up in many more places than just the configuration. Plugins such as the Better Search Replace can be helpful in speeding up this process.
If the domain will remain the same after the migration, you’ll only need to change the A record for your domain to point to the IP address of your new hosting account. This process varies between registrars, so it’s best to discover how to do this part with whomever you purchased your domain from.
Additionally, some WordPress themes also require additional steps after you complete the previously mentioned steps. For example, if you’re using the Avada theme, you will need to clear the Avada Fusion Builder cache after migration.
At this point in your migration, do some quality control and double-check that the migration went well. Follow these steps:
Step 1: Make sure your permalinks to your posts and pages are updated. In WordPress, go to Settings > Permalinks, and click Save (you don’t need to change anything else on this page). This makes sure all the permalinks are refreshed to match the new host since they sometimes get messed up during a migration.
Step 2: Now, check to make sure pages, posts and links are showing up and working properly. Check for missing images, broken links, and other signs that things might be broken. If you find any problems, be sure to fix them in WordPress. Some common areas to troubleshoot include:
- Contact form not sending emails after migration
- Modify control files accordingly in website builder
- PHP version differences on website source and hosting destination
- Check for remnants from previous hosts in WordPress files (for example, WP Engine and BlueHost)
Step 3: Delete the installer and archive files from the tool you used, since they can pose a security risk. Keep the local backup copy of your files and the database export, along with the original wp-config.php file in case you need to reverse the migration.
Step 4: Cancel your account with your old hosting provider so you don’t get charged twice.
Step 5: Make sure your website has SSL, CDN and Firewall configuration.
Pro tip: Update your IP in your Firewall settings after migrating to a new host.
Looking for a super easy way to migrate your WordPress site? Learn about GoDaddy’s 1-Click WordPress Migration, Pagely's managed WordPress hosting for enterprises, or check out the Hub by GoDaddy Pro for streamlined migration and backups for WordPress sites plus priority support whenever you need it.