Are you looking into migrating your WordPress site to a new host or server?
The process can seem overwhelming at first, as you decide whether to use a plugin to help automate the process, or go the DIY route.
The last thing you want is for your site to go down and lose data.
To help make this process as smooth and painless as possible, we put together this detailed guide that covers exactly what you need to do to get your WordPress site moved over to your new host.
We explore the pros and cons of manual vs. automatic migration, different hosting and plugin options, and frequently asked questions and troubleshooting tips.
- Frequently Asked Questions
- What You’ll Need to Migrate your WordPress Site
- How to Migrate Your WordPress Site With a Plugin
- How to Migrate Your WordPress Site Manually
- 1: Setup Your New WordPress Host
- 2: Back Up Your WordPress Files
- 3: Backup and Export Your Site’s Database
- 4: Import Your Old Database into Your New One
- 5: Transfer Your WordPress Files
- 6: Point Your Site’s wp-config.php File to Your New Database
- 7: Update Your Domain Name Server (DNS)
- Troubleshooting WordPress migration issues
- Wrapping Up
Frequently Asked Questions
Before you start the migration process, you might have a few pressing questions. Below, we offer some common answers.
Can I Migrate my WordPress Site for Free?
Yes, you can certainly migrate your WordPress site for free.
That is one of the main appeals of doing the entire process yourself, because it doesn’t require signing up or paying for an additional service like a plugin.
However, there are also a handful of hosts and plugins that will handle parts of the migration process for free as well.
What is WordPress Migration?
WordPress migration is the process of transferring your WordPress website over to a new web host or server.
There are a number of reasons why you might consider switching your host, including wanting faster loading times, better support, scaling options, or cheaper prices.
Should I Choose Manual or Automatic Migration for My WordPress Site?
There’s no right answer here. It depends on how much time and effort you’re willing to invest in the process.
If you’re comfortable with the technical aspects of your site and data, and aren’t worried about having the quickest and easiest solution, then spending an afternoon handling it yourself is the way to go.
But if the thought of that stresses you out, and you want to avoid any potential technical difficulties, then you’ll probably be happier with a plugin.
What are the Different Types of Website Hosts?
When you’re choosing which hosting provider to move your site to, you’ll probably come across a few different options.
Here’s a quick breakdown of the differences between each so you can make the best decision for your needs.
- Shared hosting: Typically the cheapest option out there, this type of hosting houses multiple websites all on one server, and they share resources between them. While this is acceptable for smaller sites, you’ll end up sacrificing speed and other features as you scale.
- Virtual private server (VPS) hosting: This is similar to shared hosting in that one server houses multiple sites, but there are virtual partitions between them, which means your site will have its own dedicated space and resources.
- Dedicated hosting: You get your own physical server all to yourself with this type of hosting, so you don’t have to worry about sharing resources with any other sites.
You’ll also need to choose whether you want to opt for a managed host or not.
If a host offers management, that means that they will handle a lot of the behind-the-scenes technical tasks for you: like backups, updates, and more.
What You’ll Need to Migrate your WordPress Site
Chances are you already have most of what you need to get started: a computer, your WordPress website and logins, and your new host information.
Method 1: Manual Migration
- A new host for your site
- Your current WordPress website and login credentials
- Access to your WordPress files and database via FTP or program like cPanel
Method 3: Automatic Migration
- A new host that offers automatic WordPress migration (see list for recommended options)
- A WordPress migration plugin to handle the migration process for you
Check if Your New Host Offers Migration Services
Since switching hosting platforms is a common occurrence, many companies will include automated migration in their hosting plans, or offer it as an addon.
To help you decide if using one of these services is the right move for you, here’s a list of some popular options, pricing, and details:
- WP Engine: Offers WordPress and ecommerce site hosting plans for startups, small businesses, large companies, and enterprises and agencies. Their plans include a variety of features and services, and all plans include automatic site migration to their server via their plugin. Plans start at $20/month and increase with added functionality.
- Bluehost: Offers scalable hosting plans for a range of sites and needs. With plans starting at just $4.95/month for one site, it’s definitely one of the more affordable options. Free automated migration service is included in every hosting plan.
- DreamHost: Offers two plans for WordPress site hosting: a basic plan for $2.95/month that covers the barebones for new sites, and their DreamPress plan for $16.95/month that provides full managed services. They include a migration plugin for free with each plan, and have an option for extra migration assistance for a one-time fee of $99.
- Kinsta: Offers a variety of premium hosting services in all their plans, scalable according to the size of your website and business. They include free automatic migration in every plan. Pricing starts at $35/month for the starter plan, with several options for a range of businesses, agencies, and enterprises.
- Flywheel: Offers managed WordPress hosting and growth plans for small sites, freelancers, and agencies. Free unlimited migration is included with each plan, and they offer expedited services for an extra one-time cost of $50. Their plans start at $15/month, and go up from there as you add features.
Top WordPress Migration Plugins
If your new WordPress host doesn’t include migration in their plans, or if you prefer to go another route, here are a few of our favorite WordPress migration plugins.
- All-In-One WP Migration: This is one of the most popular WordPress migration plugins available, with over 6,000 5-star ratings. It’s incredibly easy to use, with a drag-and-drop function that exports and uploads your entire WordPress site in one tidy package. The basic plugin is free to download and use, and they offer upgrades for more functionality.
- Duplicator: Boasting migration with zero downtime, this is another highly-rated choice. The free basic version allows you to move your WordPress site between domains, hosts, and servers, by exporting and uploading your site into one bundled file package. If you want more advanced features and drag-and-drop functionality, you can upgrade to their pro plan.
- WP Migrate DB: This plugin allows users to migrate their WordPress database without having to mess with SQL themselves. The basic free version has limited functionality, though, so if you want to migrate your entire site including themes, files, and media, then you’ll need to upgrade to their paid version.
- Migrate Guru: Offering WordPress migration in one click, this is a great plugin option if you want a highly simplified method to clone and transfer your site. It focuses on fast upload speeds and compatibility with large sites (over 200gb).
How to Migrate Your WordPress Site With a Plugin
Depending on the plugin you choose to download, the instructions will vary.
However, most migration plugins streamline the process of extracting and uploading your site’s SQL database along with any themes, files, and media, so all you have to do is click a couple of buttons or drag-and-drop a file package, and the plugin handles the rest.
Each plugin comes with its own documentation and support setup as well, so it’s easy to troubleshoot any issues that come up (if any).
How to Migrate Your WordPress Site Manually
If you want an inside look into the technical aspects of migrating your WordPress site, you can try your hand at the DIY method.
While this does come with some inherent risks and without the support of teams of developers, as long as you follow the detailed instructions we’ve included below, you should be able to successfully transfer your site without any hiccups.
1: Setup Your New WordPress Host
Hopefully you already have a new home ready for your WordPress site to move into.
Make sure you have any necessary login information ready to go so you’re ready to upload.
2: Back Up Your WordPress Files
First, make sure you have a file transfer protocol (FTP) software installed.
We recommend the free, open-source FileZilla if you don’t already have one.
- Connect your FTP to your WordPress server, then navigate to the root folder on your site. It will usually be labeled public_html or the name of your website.
- Right-click on the root folder and select Download.
- Wait for the process to complete. Once it’s finished, you’ll have a complete copy of your site’s files on your computer.
3: Backup and Export Your Site’s Database
Now that you have your site’s files and content backed up, you need to access and download a copy of all your data as a SQL database.
Most hosting companies use a version of cPanel, so that’s what we’ll use in this guide.
If your host uses something different, don’t worry. The steps should still be similar enough for you to follow along.
- Start by logging into your host’s cPanel.
- Locate and select the phpMyAdmin icon.
- In the phpMyAdmin window, there will be a list of databases in the left panel.
- Select the database for the site you want to migrate.
- Next, click the Export button from the menu at the top of the screen.
- You’ll be shown options for the export method. Choose Custom.
- Select SQL as the format.
- Make sure to Select All from the Tables box, so everything from your database will get exported.
- Find the Object Creation Options section.
- From the list, select only the following:
- Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT statement
- Add CREATE TABLE statement
- IF NOT EXISTS
- AUTO_INCREMENT value
- Enclose column and table names with backquotes
- Finally, decide if you want to limit the Maximal Length of Created Query. This can help mitigate any errors in the exporting process, so if your site is over 300mb, we suggest setting the limit to 1047551.
- Once you’ve double checked the above settings, click Go at the bottom of the screen. This will start the exporting process and save a copy of your site’s database as a .sql file extension.
4: Import Your Old Database into Your New One
Now that you’ve backed up and downloaded copies of your WordPress site’s files and data, you need to create a new home for it.
You can do this by creating a new SQL database on your new hosting provider, and then importing your old database into it.
If your host uses cPanel, you can follow these steps:
- Find the Databases section in cPanel.
- Select MySQL Databases.
- Create a new database and add a user. Make sure to note the names you use so you can access it later.
- Navigate to phpMyAdmin and access your newly created database.
- Select the Import tab and upload the .sql file you exported earlier.
If your web host uses something other than cPanel, these steps might vary.
But the general process should be similar: you’ll need to create a new SQL database on your new server and import your downloaded .sql file into it.
5: Transfer Your WordPress Files
Now it’s time to move all your site’s files over to your new host server.
Remember the FTP you used in step two? Fire it back up now.
- From your FTP, navigate to the root folder.
- Right-click and choose Upload.
- Select the folder you downloaded earlier with all your WordPress site’s files and directories. Make sure you select them all.
- Wait for the process to complete. It may take quite a while, but luckily, you’re nearing the end of your migration.
6: Point Your Site’s wp-config.php File to Your New Database
The wp-config.php file is located in your site’s root folder, and basically contains details like your database connection information.
This means that in order for the migration process to work, you have to update the file to point to your new database instead of your old one.
Here’s how to do that:
- Use your FTP to locate and select your new root folder.
- Find the wp-config.php file, right-click, and select View/Edit.
- A text-edit window will open, allowing you to change this information. Update these lines:
- These lines will currently contain your old database login information, so you need to update them.
- Replace the information in ‘db_name’, ‘db_user’, and ‘db_pass’ with your new database login (which you created in step three).
- Save changes and close the file. Now you should be able to access your WordPress site on your new host!
7: Update Your Domain Name Server (DNS)
The final step before your site is fully live on your new host is to update your DNS so it points to your new server.
Unfortunately, the instructions for how to do this will vary between hosts and domain name providers.
However, they should essentially involve the following steps:
- Find your new host’s domain information (usually in the form of CNAME and A NAME records).
- Log on to your DNS provider.
- Navigate to where you can edit your DNS records.
- Edit the CNAME and/or A NAME records to match the values you got from your new host.
It might take a few minutes for the change to take effect, but once it does, your site should be fully live and functional and the migration process complete!
Troubleshooting WordPress migration issues
Ideally, you got through the migration process without any issues and your WordPress site looks great on your new hosting platform.
However, sometimes technical difficulties can come up during this process for a number of reasons.
Here are some of the most common challenges people run into, and suggestions for how to solve them.
1. Database Imports Missing Information
This has to do with the Maximum Length of Created Query setting you adjusted earlier in step three.
If you’re running into problems here, you can try cutting down the query length by half to 523776 bytes, or increase it to 104858 bytes until the import is successful.
2. Connections Time Out
If at any point in the process your connections and process time out, there’s a good chance your site might just be too large to successfully complete a manual migration.
You can try again, but you’ll probably be better off using a plugin or getting support from your host.
3. HTTP 500 Error
This can be a highly frustrating error, as it doesn’t offer any explanation or clue as to the cause.
To fix it, you’ll have to restart the entire migration process.
Before you do so, try disabling caching and any firewalls.
Also, double check both wp-config.php versions match.
Establishing Database Connection Error
If you receive this error, it’s likely your wp-config.php file information is incorrect.
Go back in and check that the data matches your new host’s login information, and there are no spelling errors or typos.
Hopefully, this guide helped you successfully migrate your WordPress site to a new host.
Although it can be a confusing and overwhelming process on the surface, we tried to equip you with helpful knowledge on both automatic and manual methods so you can make the best decision for your site.
Which route did you decide to go? If you have any questions, comments, or anything else to share, please feel free to put it in the comments.