Help Center
How to Migrate a WordPress Website

How to Migrate a WordPress Website

This tutorial will guide you on how to migrate a WordPress website and the methods of doing it.

There might be several reasons why you need to migrate your website. The most common are as follows:

  • moving from one hosting provider to another;
  • moving from a local environment to a remote hosting provider;
  • moving from a hosting provider to a local environment to modify and work on the website’s improvements. 

Knowing how to migrate a WordPress site is a must if you are in any way involved in web development.

There are three methods of migrating a website:

  1. using a plugin; 
  2. manually;
  3. using a migration service of your hosting provider. 

The first two methods in our list above are the most versatile and will work with any hosting provider. The third one is hassle-free, but not all hosting providers have this option. Most WordPress managed hostings have it; it can be included in a plan or be an extra-paid service. 

There is also a way to migrate using a backup wizard of cPanel and other specific methods. But, considering that your new hosting provider might use a different panel, we will not describe it. 

Before You Start a Migration

Many beginners are pretty intimidated by the migration process because it can cause data loss. That’s why the most important thing to do before you start a website migration is to create a backup of the website using the hosting provider panel (or a plugin), backing up both files and a database. Every hosting provider has this option and depending on the dashboard (cPanel, Plesk, or other panels), you can find it in different places. 

Log in to your hosting admin panel and find where you can create a backup of the current website version and start the backup process. Normally a button “Restore from backup” is on the same page. So, if something goes wrong with the migration process, you will always be able to restore your website within minutes. 

If you will migrate from a local host on your computer, use one of the backup-migration plugins and save the backup on your computer. We will talk about such plugins later. 

Migrating a Website Using a Plugin

This method is easy and convenient. The key point is to choose the right plugin. If you don’t want to purchase one and you have a small website (up to 128-500 MB), you have a big choice of good plugins. If your website is large, it’s a good idea to consider buying a premium plugin or feel confident with a manual migration. 

There are many migration plugins; let’s have a look at several of the most popular and convenient. 

How do migration plugins work? 

Migration plugins are, first of all, backup plugins. They create backups you can later unpack and replace all your website content, elements, and settings. The vast majority of such plugins allow you to download backups to your computer. Predominantly premium versions of them often offer to store them somewhere on a cloud. And as a rule, you can find your backup archives on your FTP inside the folder of the particular plugin. 

The rest can vary: some ask you to choose what exactly you want to back up. Some do it by default. 

Things to know

Backup&Migration plugins are one of those you should pay attention to all the settings and go through them all. Default settings might not be suitable for many websites.

Backup Migration

Backup Migration plugin

Why is it worth attention: 

  • This plugin offers you to migrate websites up to 2 GB in their free plan.
  • It has a friendly and easy-to-use user interface, with all the necessary settings but without something to confuse a beginner WordPress user.
  • The plugin offers a “super quick migration option” using the link where your archive is stored. 

Price: free / starting at $19.98 (lifetime, because many of the plugin’s features are still under development).

Tip: pay attention to the settings and what you are going to exclude from the backup. 

Summary: this plugin is easy to use, and the free version offers to migrate quite big websites. All the necessary settings are there, too. 

WPvivid 

WPvivid Backup plugin

Why is it worth attention:

  • Auto-migration functionality, when you install the plugins on both sites, connect them with the key, and migration is performed automatically.
  • Staging feature (but to push it back automatically to the live website, you have to buy a premium).
  • This is a plugin with a lot of settings to tune every little detail.
  • It doesn’t limit the size of the website you want to back up and migrate.

It allows you to store your backups on the cloud services, such as Google Drive, Dropbox, OneDrive, DigitalOcean Spaces, FTP, or SFTP, even in a free plan.

Price: free / starting from $29 annually and $99 lifetime. 

Summary: only the fact that this plugin doesn’t have limitations for the size of your backup is already amazing. Many options and a staging instrument give reasons to love this plugin. 

The free version has quite limited functionality for creating scheduled backups, but it works perfectly if you need to migrate your website or create backups manually. 

Overall, it’s a fantastic plugin with powerful functionality.

All-in-One WP Migration

All-in-one Migration plugin

Why is it worth attention: 

  • User-friendly and straightforward interface.
  • It’s very easy to use.
  • You can choose exactly what to export (and migrate) because this plugin offers a big list of choices.
  • With premium extensions, you can store backups on various cloud servers.

Price: free / extentions from $69 a year. 

Tip: this plugin has a limitation on file upload size (when you import your website to a new hosting), and it can’t exceed 512 MB. If you want unlimited, they offer you to buy a $69 extension. But in fact, this limit depends on your hosting provider and the memory limit settings. 

Summary: this plugin is amazing for migrating small websites. Some efforts are needed to bypass file size restrictions to deal with large ones. 

Migrating a Website Manually

This process consists of five main steps:

  1. exporting a database;
  2. exporting files; 
  3. importing files to a new hosting;
  4. importing the database to a new hosting; 
  5. changing configuration settings of the migrated website.

Exporting a database using phpMyAdmin

  1. Log in to phpMyAdmin app. The access to it is provided by the hosting provider, as well as login and password.
  2. Find the database of the website which should be migrated. If you don’t know the name, you can find it either on the hosting dashboard or in the config.php file in the root directory of your WordPress. Find the line:
define( 'DB_NAME', 'Your_database_name' ); 

where “Your_database_name” will be the name of your database.

  1. Select this database and press open the “Export” tab. 
  2. Choose the Quick export method and SQL format.
  3. Press the “Go” button on the right side of the screen. 
  4. Save the file on your computer. Zip it (for further import to the new hosting). 
phpMyAdmin export WordPress database
Things to know

phpMyAdmin is the most popular application to deal with website databases. If your hosting provider uses another app, the export and import processes will follow the same logic described when working with phpMyAdmin.

Exporting files

Using an FTP client of a File Manager on your hosting, copy your website’s files to the local computer (they are usually stored in the “www” folder (if it’s your main domain), or, if it’s a subdomain, the folder will have the same name as a subdomain).

WordPress website file export

Importing files to a new hosting

Paste the website files to the website folder on the new hosting. If you use an FTP client, just transfer them. If using a hosting File Manager, upload the Zip archive and unzip it. 

Importing the database to a new hosting

  1. Create a new database and a new database user with all the permissions. 
  2. Import the website’s database from your computer, using either phpMyAdmin or the hosting provider’s dashboard. If you are asked about encoding, for most cases, utf8_general_ci would be a perfect solution. 
  3. Copy and paste your database name, username, and user’s password to the notepad. 

Changing the wp-config.php file

  1. Find the wp-config.php file on the root of your website and open it. 
  2. Find the following lines:

Consider that “DB_HOST” is often ‘localhost.’ If not, reach out to your hosting support to provide you with the hostname. 

  1. Save changes. 
  2. Open your new website and make sure everything works well. 
Things to know

If after the website migration it still redirects to the old domain, go to phpMyAdmin and replace the old URL with a new one at “home” and “URL” lines in the wp_options table.

Using Your Hosting Provider’s Migration Tools

Most hosting providers (especially WordPress managed hostings) offer a Migration Tool to move the website to their hosting. Many of them (Kinsta, Bluehost, WP Engine, GoDaddy) use the MigrateGuru plugin. You need to install the plugin on your old website and follow the instructions, filling up all the necessary information about your new hosting where you already have an account. It’s a quick and easy method of migrating websites, and if your hosting offers this option, consider using it. 

Now you know how to migrate your WordPress website using one of the three most popular methods. 

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.