How to Migrate WordPress Site Successfully: Complete Guide
Bulletproof Backups for Your WordPress Website
Fortify your business continuity with foolproof WordPress backups. No data loss, no downtime — just secure, seamless operation.
There are many reasons to migrate a WordPress site from one web host to another. You may be having issues like slow load times, poor service, or increasing costs. Or your site is growing, and you need a faster or better web host.
Whatever the reason, migrating your WordPress site is not an easy decision. It is always a fraught exercise.
You don’t want downtime. You don’t want to lose your data. And you don’t want to be overwhelmed by the technical aspects.
In this article, we will show you how to migrate a WordPress site quickly, safely, and with zero downtime, for free.
TL;DR: Move your site with zero downtime using Migrate Guru. Migrate Guru is a free WordPress migration plugin that works flawlessly with 5000+ web hosts.
What is WordPress migration?
WordPress migration is the process of moving a WordPress site from one place to another. It can mean a few things:
There isn’t one definition for WordPress migration. They are not exclusive either. You can move your site to a new host and want to change over to a new domain as well.
🔥 Successful WordPress migration is to have a functional site at the end of the process. The site should work, the links should work, and all the media should work. With zero downtime.
In the next few sections, we have broken down the migration process into actionable steps. Read through everything once, and then plan your site migration.
Step 1: Pre-migration checklist
The first step when migrating a WordPress site from one host to another is to be prepared. You will need a few things to migrate your site, and you want to have those at hand.
Gather all the data you will need
Prep your website
Set up the destination host
💡 Ensure a successful move with a comprehensive migration checklist.
Step 2: Migrate your WordPress site
There are many ways to migrate a WordPress site, which we are covering in extensive detail below. But the only method guaranteed to work every time is to use a dedicated plugin. There are many WordPress migration plugins you can choose from. After extensive testing, we have discovered many, except for Migrate Guru, very unreliable.
Apart from dedicated migration plugins, you can also try out backup plugins. Most WordPress backup plugins of any value will have a migration option. BlogVault does too, and we recommend trying out its backups, staging, and updates features.
Option 1: Migrate WordPress site for free with a plugin
Migrate Guru guarantees flawless site migration with zero downtime. It supports over 5,000 web hosts out of the box, and actually powers the migration features of many of the top ones.
Built by the BlogVault team, Migrate Guru migrates sites securely and is free to use. Migrate Guru is the only error-free migration plugin. It can handle WooCommerce stores, multimedia-heavy blogs, or multisite networks with many subsites.
1. First, install and activate Migrate Guru from the Plugins section of your website.
2. Next, enter your email address to create an account, and click on Migrate Site.
3. From the dashboard, select your destination host. If you can’t find an icon for your web host, choose either cPanel or FTP to continue.
4. Enter all the relevant details, and click Migrate. Check the additional customisation options in case those apply to your site.
And that’s it! You’ll get a confirmation email once the migration is complete.
Once your site has migrated, skip over to the post-migration checklist below to tie up all loose ends.
Why we recommend Migrate Guru
There are a fair few WordPress migration plugins out there, Migrate Guru? Of course, we built the plugin, so we know it works perfectly. Plus there are a host of other reasons as well:
Option 2: Migrate from the web host panel
Major WordPress web hosts will have free migration services. If you cannot find the service on your dashboard, write to their support. In fact, BlogVault has built the migration plugins for most web hosts.
In this section, we will take you through the process of migrating to a destination web host. The steps will be similar across different hosts. You can also just install Migrate Guru, as it works with all the hosts below.
Bluehost
1. To migrate your WordPress site to Bluehost, create a Bluehost account and log in. Navigate to My Sites from the navigation menu, and click on Add site.
2. Next, click on Migrate Existing Site.
3. You will be taken to Bluehost’s Migration services panel. Agree to the terms of services, and click on Get Started Now to proceed.
4. Enter the URL of your WordPress site, and click on Check. This step performs a compatibility check to ensure that the migration process goes smoothly.
5. Next, you will need to install the Bluehost Site Migrator plugin on your site, and activate it.
6. The plugin will check for compatibility again, before starting migration.
7. Click on Start Transfer to begin.
The plugin will commence the transfer process. Once it is done, you can proceed to the post-migration checklist.
⚠️ As indicated on Bluehost’s site, you cannot use this service to transfer a domain name to Bluehost. That is an entirely separate process.
DreamHost
1. To migrate a WordPress site to DreamHost, log into your DreamHost account, and navigate to Websites > Manage Websites.
2. Click on + Add Website to proceed.
3. Start setting up your website. First, you need to select a domain, or leave that for a later step. If you choose to leave it for later, you can enter a temporary name in the next screen.
4. Next, you need to choose hosting.
5. Finally, you will need to install WordPress. Once this step is complete, you have a blank WordPress site set up. Next, click on Set Up Website to proceed.
6. Once WordPress is installed, you’ll be taken back to the Manage Websites dashboard. There, locate the site you just created, and click on Manage.
7. Scroll down to the Migrating this site to DreamHost? section and click on Get Key. Copy the key.
8. Next, you need to log back into your wp-admin. Install and activate the DreamHost Automated Migration plugin.
9. Enter your email address, and click on Migrate.
10. Enter the key from your DreamHost dashboard, and click on Migrate.
Kinsta
1. To move a WordPress site to Kinsta, create and log into a Kinsta account. From the navigation menu, select Migrations.
2. Depending on how much help you need, you can choose a premium migration or a basic one, which is free. Since our test site is currently hosted on an eligible web host, we chose Request Basic migration.
3. Read all the instructions, and follow onscreen instructions to reach the request form. Click to Finish to complete the process.
Kinsta migrations are done manually, hence the lengthy request form.
Flywheel
1. To migrate a WordPress website to Flywheel, log into your hosting account. Scroll down to the Migrate sites for free, and click on Begin a migration.
2. Click on I got this from the Self migrate section.
3. Follow the instructions, and Get the plugin. Install and activate Flywheel Migrations on your site.
4. Enter your email address and click on Get Started.
5. Fill out your site details, and click on Migrate.
💡 Most other web hosts will have similar processes for migrating sites. In a few cases above, you will have seen that BlogVault powers the web host’s migration plugin. It is like using a different flavour of Migrate Guru.
Option 3: Migrate a WordPress site manually
WordPress site migration is not for the faint of heart. WordPress plugins intend to make migration easier, yet we encountered several errors. Trust us when we say that manual migration is far, far worse.
If you must migrate a WordPress site manually, please take a backup first. We lost count of the test sites that broke because of failed migrations. At least on our part, that was an intentional decision to feel the pain of a failed migration. Again, trust us when we say, it is not worth it.
🚨 Final warning before we launch into the steps: manual migrations often fail for large sites. Connections time out, files get corrupted, and database tables get messed up. Manually migrated sites end up with critical errors.
a. Download a copy of your website files and folders
The first step is to download a zipped copy of your WordPress files and folders. You can do this via FTP or via File Manager on cPanel, if your host has it. Find the root directory of your site, which is often public_html, and download the whole thing.
If you are using FTP, please note that this process will take a long time to complete. For our small test site of less than 100 MB, the download took over an hour to complete. This is because FTP transfer is very slow.
b. Export a copy of the database
Next, get a copy of the site database. You can use phpMyAdmin to do this, or whichever tool your host has available. In our case, the host used Adminer to manage the database.
If you have more than one database, make sure to select the correct one. If you are unsure which database is the correct one, check the wp-config.php file for that information.
Stick to the SQL format, as most WordPress databases use it.
c. Upload files backup to the new server
On the new host, upload the zip file containing website files to the server.
Extract the folder.
Since WordPress is already preinstalled, it needs to be overwritten. The simplest thing to do is rename the existing root directory to something else. Then, change the uploaded directory to the root name.
d. Setup site database
Now that the WordPress files and folders are in place, the database is next up. You might have to create a new MySQL user to set up a database. This is necessary in case you are setting up WordPress installation from scratch.
If you have WordPress pre-installed, then a database user will likely exist already. Either way, note down the database user credentials.
Next, drop the pre-installed database tables, if any.
Finally, import the SQL file to the database.
e. Connect the site and database
All the pieces are now in place, so we’ve got to connect them together. We need to configure the database in the wp-config.php file.
Open the wp-config.php file.
Change the following values to new ones: DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST.
You may need to change table_prefix from wp_. This applies if you had changed the table prefix on your old site.
If you are replacing a web host installation, you can use their wp-config.php as a template as well.
Option 4: Migrate a site using SSH or WP-CLI
In the previous section, we covered how to migrate a WordPress site manually. However, that was via pleasant user interfaces, and it was still a painful process. In this section, we take the pain up a couple of notches, and show you how to migrate your site manually via SSH.
a. Download a copy of your site
To use SSH to migrate your WordPress site, you will need to use the command line. You may need an SSH client to do this, or use one that comes with your machine. We are using Terminal with macOS for this article.
You will need 3 things to log into your server using SSH: server address, username, and password. You can get these from your hosting panel. Create a folder on your local machine, where you want to store the site copy.
On the terminal, type a command in the following format:
scp -r username@serveraddress:rootfolder localfolder
Both in the case of the ‘rootfolder’ and ‘localfolder’, make sure to enter the entire paths to both, including slashes. Once the command executes, you will be prompted to enter your password. Enter that, and execute again. This will copy your entire root directory to the local folder you have specified.
b. Download a copy of your site database
To download your WordPress database via SSH rather than using phpMyAdmin or a plugin, you need to install WP-CLI.
Note: When we tested this method, we realised that our machine didn’t have PHP installed, which is necessary to run WP-CLI commands. So we went through a rabbit hole to install command-line tools for our machine, to install a package manager called Homebrew, to then install PHP, to finally be able to install WP-CLI, and then finally export a copy of our site database. If any of this sounds disturbingly unfamiliar, we have linked helpful articles for each step.
Once you’ve completed all of these steps, it is finally time to download the database. Log into your server through SSH, and navigate to the folder that has the wp-config.php file, generally public_html. Then, execute the following command:
wp db export filename.sql
Replace ‘filename’ with an appropriate name for the database download file. The file will save to the same folder. Exit the server, and then download the database file to your local machine:
scp username@serveraddress:rootfolder/filename.sql localfolder
This will save the database backup to your local folder.
c. Upload files to the new server
Essentially, we will now be performing the reverse of step 1. But before moving your file backup to the new server, make sure to zip the folder on your location machine. It will make the transfer process easier and faster.
Execute the following command:
scp zipfile.zip username@serveraddress:rootfolder
In this case, the ‘username’, ‘serveraddress’, and ‘rootfolder’ values are for your destination server. Once you execute this command, you will be asked to input the password to your new server. After you’ve entered your password, your zipped file will start uploading to your destination server.
Next, you will need to unzip the file you’ve just uploaded. Log into the server, and navigate to the folder where the file is stored. Then execute the following command:
unzip zipfile.zip
Once the file is unzipped, the contents will be stored in a folder of the same name. These files need to be in the root directory of your site, not in this subdirectory. So now you need to move them up. Go into the newly unzipped directory, and then run the following command:
mv * ../
This will move all the contents of the current directory into the root directory, and takes care of the migration of your WordPress files.
d. Upload database to your new server
The next step is to migrate your database to your new server. The command is very similar to the one you used to upload the zip file:
scp filename.sql username@serveraddress:rootfolder
This has uploaded your database backup to your server. The next step is to install it. Log into your server, and navigate to the root directory. Execute the following command:
mysql -u username -p databasename < filename.sql
‘username’ and ‘databasename’ in this instance are the credentials for the freshly installed database on the new server. This command will replace the database with the contents of the SQL file specified.
Step 3: Configure your new domain [optional]
Sometimes a domain migration takes place at the same time as a host change; other times it doesn’t. The most common occasion to change both is when making a site live, after building it elsewhere first. If you didn’t change the domain, you can skip this section.
a. Configure new domain in the database
To make sure the right domain points to the database, you need to change two values in the wp_options table: siteurl and home. It is simply a matter of right-clicking on each option value, and replacing the old URL with the new one.
b. Change links to reflect new ones
Once the database is configured and the new site is loading correctly, it is time to edit the links. This will also affect uploaded images, so be prepared to see broken images before you fix this.
Note: Skip this section if you are not changing the domain name.
Go into Settings on the left sidebar, and then into General.
Change the values for WordPress Address (URL) and Site Address (URL) to point to your new domain.
Alternatively, you can use a plugin to do this. We used the Velvet Blues Update URLs plugin.
Once installed, navigate to the Tools menu, and click on Update URLs.
Enter the new URL in the Step 1 field, and check all the appropriate boxes in Step 2.
Click on Update URLs NOW to continue.
Step 4: Change the DNS records
Since your site has moved to another server, you now have to point your domain to that new server. This step also applies if you are changing the domain name of your WordPress site.
a. Get DNS details from your web hosting provider
You need the DNS records from your web host. DNS, or domain name servers, help map the domain name to the correct server. All web hosts will have DNS information readily available. Copy the information from the site server.
b. Update DNS details with domain registrar
A domain registrar is where you bought your domain name from. They also map your domain name to the hosting server using DNS records.
You need to update the DNS records for your domain to point to your site server. Each registrar will have their own instructions in their documentation. The update may take a few hours up to a day to reflect. So don’t be alarmed if typing in the URL doesn’t immediately load your site.
Note: Many web hosts offer free domains along with their hosting packages. If this is the case with you and you are migrating to a new host, you may have to check how this affects your domain. You can look for standalone domain services with the old host, or port to another registrar.
Step 5: Post-migration checklist
Congratulations, your WordPress migration has worked and your site is in its new home! You’re now in the home stretch.
Several things can and will change on your site post-migration. It is always better to have a final check to make sure everything is working as it should.
Once you are through with the post-migration checklist, you can now focus on running your new site. Many of the things we have included in the post-migration checklist are automatically taken care of by Migrate Guru. It really is that efficient and effective.
Extra things to consider with WooCommerce sites
The important thing to remember with a WooCommerce site is that data tends to be dynamic on the site. That means users, products, orders, and subscriptions can change on a minute-to-minute basis. So migrating a WooCommerce site differs from migrating an ordinary WordPress site.
The best thing to do with a WooCommerce site is to put it into maintenance mode first. This prevents changes to the store. Then use Migrate Guru to move the site to its new server.
Extra things to consider with multisites
Multisite migration is complex. The complexity increases when the domain name changes, as the database contains references.
There are additional places to edit in the multisite database:
- wp_blogs entries to change folder name
- wp_posts tables
- wp_site
- home, siteurl, fileupload_url fields in wp_options
If moving from subdomains to subfolders or vice versa, remember to adjust:
- The .htaccess file
- The value for SUBDOMAIN_INSTALL in your wp-config.php file
Note: Some hosts don’t allow multisite installations by default. Please check with the destination web host about restrictions they may have in place.
Troubleshooting WordPress migrations
We hope you don’t need this section, but if you used the manual method, chances are, you ran into some of these issues.
During testing, we ran into the HTTP 500 ERROR for 48 hours till we figured out which tiny mistake caused it. It was frustrating and time-consuming. Luckily we had backups, so we wiped out everything and started from scratch.
- HTTP 500 ERROR: This error has a wide variety of causes, and is unclear. This is why you should disable caching and firewall plugins, and make sure the php versions match. We recommend using a resource to troubleshoot the HTTP 500 ERROR.
- Error establishing database connection: This error is usually caused by incorrect credentials in the wp-config.php file. Check the values for DB_NAME, DB_USER, DB_PASSWORD, DB_HOST, and table_prefix. That last one tripped us up for a while before we realised that was an issue. It literally had 1 character that was incorrect.
- SEO issues post-migration: If you see your rankings fall, chances are you haven’t handled the redirects correctly.
If none of the solutions above work, you can either reach out to your host’s support team or hire a developer. If we had a failed migration, we would wipe the server, reinstall WordPress, and use Migrate Guru.
Why we don’t recommend migrating a WordPress site manually
Manual WordPress migration to another host is nothing short of a nightmare. Apart from the time it takes to do, there are many factors that can upend the process. We tried manual migration several times, and each time there were many things that went wrong. So much so that we restarted the process a fair few times before succeeding.
Although we experienced many of the issues below firsthand, we didn’t experience all. We’re certain that even more things can go wrong. And we would have been stuck in a pit of frustration and despair for even longer. What an awful thought.
- During migration, the last thing you want is to have downtime. You need your site to be up and running.
- You need developers to migrate sites manually, or need to ask your web hosts for help. It is an extra cost with the former, and a tedious process with the latter.
- Transferring from one host to another can have conflicts. Perhaps they have customised WordPress installs or different PHP versions.
- Data loss is a real issue. You can lose content or even your entire site during a migration. Especially if your site is large, there is danger of timeouts during transfers.
- SEO rankings can tank if the migration isn’t done correctly.
- When changing core files or database settings, one typo will crash the whole site.
Overall, migration is a time-consuming process that is prone to human error.
Best practices for migration
There are a few measures to take so that your site migration is smooth. This list repeats some of these measures in the checklists above, but they still apply.
- Take a backup of your site before doing anything to it.
- Use a dedicated migration plugin like Migrate Guru. Or use the migration feature of a good backup plugin like BlogVault.
- Keep all your credentials handy. This includes credentials for both the source and destination servers, wp-admin, and the domain registrar.
- Make sure to install the same versions of WordPress and PHP on the destination server as is on the host. If necessary update the source first, if you cannot configure the destination one.
- Deactivate all plugins and all but a single stock theme. This is especially important for caching and firewall plugins.
- Prevent users from making changes with a maintenance mode plugin.
- Make sure to go through the entire post-migration checklist. If you are changing your domain, you need to set up redirects to keep your SEO equity intact.
For the most part, plugins make WordPress migration significantly easier. Following these best practices will save you a great deal of time and effort as well.
Reasons to migrate your site
No one undertakes site migration for fun. There is a very real danger of losing your site and all your hard work during a failed migration. Most admins are leery of the process. Additionally, migration can be quite technical. If you need developers, it can be expensive for something that is not always guaranteed to work.
So why would anyone want to migrate their site at all?
The most common type of WordPress migration is moving to a different web host. And there are a ton of good reasons to change your web host.
- If your site is growing, it needs more server and network resources.
- Some web hosts are better than others. This could be better infrastructure, more responsive support, or even more competitive pricing.
- If your site experienced a malware attack, your web host may not have handled the situation well. Most web hosts will suspend your site, while others will delete your site outright.
- You’re changing the design of your site. So you need to move it from a development or staging site to a live environment.
Perhaps you want to change your domain name instead. It can be a huge task, with design, content, and branding changes spread throughout the site. So why change your domain?
- Rebranding, where your company name has changed so the site has to follow suit.
- Moving in or out of a subdirectory on your site to a top-level domain. An example is moving from blog.yourdomain.com to yourdomainforblog.com.
- Localisation or expansion for country-specific sites; moving a site from a .in or a .co.uk to a .com, or vice versa.
- Merging a mobile site into the desktop version after making the latter responsive. For instance, mobile sites could be on a subdomain, like m.site.com. Instead, you could make the desktop site responsive. This way the address on all devices would then be the same.
As you can see, there are several legitimate reasons to want a change. Your site is not a hostage of a bad web host or an unfortunate brand name. The good news is that migrating your WordPress site is easy and seamless with Migrate Guru.
Structure of a WordPress site and how it impacts migration
You can operate a WordPress site successfully without knowing anything about its structure. But during a migration, it is worth understanding how a WordPress site is built.
WordPress site structure
There are 2 main parts to any WordPress site:
- Files and folders
- Database
The files and folders contain the WordPress core, and all plugin and theme files on your site. These can be active or inactive plugins and themes.
The WordPress database contains all the user-generated content of your site. Things like posts, pages, links, comments, metadata, and so on, are all stored in the database. Each time a page or post loads, a core file will retrieve the correct information from the database.
Relationship between site structure and migration
You may be wondering how site structure is relevant to WordPress migration. Most articles talk about setting up a new server with a fresh installation of WordPress. Then you need to migrate the database and a few choice core files.
In our experience, this is a sure-fire method to ensure that your site doesn’t migrate correctly. You will end up spending hours troubleshooting broken images or menu links. WooCommerce databases need to migrate in full because of the way table data is stored.
Long story short, always move your entire site during a WordPress migration. Anything less is a bad idea.
Conclusion
WordPress migration is a big undertaking because so many things can go haywire. We definitely recommend against manually migrating a WordPress site for these reasons.
The best way to migrate a WordPress site to a new host or server is to use Migrate Guru. Migrate Guru is a free plugin, custom-built to provide flawless site migration.
FAQs
How do I migrate an existing WordPress site?
Migrate an existing WordPress site using a dedicated migration plugin like Migrate Guru. Migrate Guru works with all web hosts out of the box, and will migrate all kinds of WordPress sites without downtime.
What is the easiest way to migrate a WordPress site?
The easiest way to migrate a WordPress site is to use a dedicated WordPress migration plugin like Migrate Guru. Migrate Guru integrates with all major web hosts seamlessly. Use Migrate Guru to migrate a WordPress site with zero downtime and for absolutely free.
How do I migrate my WordPress site for free?
Install Migrate Guru on your WordPress site and you can migrate it to any web host absolutely for free. Zero downtime, works with all web hosts out of the box, and can move the largest or the smallest sites effortlessly.
How do I migrate a WordPress site manually?
To migrate a WordPress site manually, you need to take the following steps:
- Download a copy of the site files and folders
- Export the WordPress database
- Install WordPress on the destination server
- Upload the site files and folders to the destination folder
- Drop the existing database on the destination server
- Import the old site database
- Check the wp-config.php file to make sure the connection to the database is set up correctly
- Check all aspects of the migrated site
- Set up redirects on the old site
Tags:
Share it:
You may also like
Fix: WordPress 403 Forbidden
Stuck with a “403 Forbidden” error while trying to access your WordPress site? It’s a little scary and quite cumbersome but you can troubleshoot WordPress errors like this. It’s a…
7 Easy Ways To Fix WordPress Database Error Disk Full
You’re all set to install a new plugin or publish an important post on your WordPress site, only to be stopped by an error saying your disk storage is full. …
Fix: WordPress 413 Request Entity Too Large
Fixing errors in WordPress site is like hitting a digital roadblock. It can be frustrating and disruptive. But, you’re also left wondering why this is happening to you. The “413…
How do you update and backup your website?
Creating Backup and Updating website can be time consuming and error-prone. BlogVault will save you hours everyday while providing you complete peace of mind.
Updating Everything Manually?
But it’s too time consuming, complicated and stops you from achieving your full potential. You don’t want to put your business at risk with inefficient management.
Backup Your WordPress Site
Install the plugin on your website, let it sync and you’re done. Get automated, scheduled backups for your critical site data, and make sure your website never experiences downtime again.