How to Migrate WordPress Step by Step – Complete Tutorial


Migrating a website, either by changing the domain name, hosting or both, is easy and simple. As a WordPress expert SEO agency, we will explain in this article how to migrate your WordPress site so you don’t have to go searching for information on Google from scratch: with just a few clicks you can move your site from one hosting to another without any problem.

To perform the migration there are several options that we will see below. The migration can be done using tools external to WordPress or using internal WordPress tools. The best option will depend on the type of hosting you have, the tools it offers or your technical knowledge.

What is the purpose of a WordPress migration?

wordpress migration

There are several reasons to migrate from one WordPress website to another.

  • The first is to improve site performance due to high user traffic. If a web site has undergone a very pronounced growth in traffic, it is possible that a basic hosting is limited in terms of performance. In these cases the service is moved to a hosting with greater capacity and features and you can preserve the domain on that server or request that it be transferred to the new hosting.
  • Another reason why you can change hosting and move a website is because of the economic issue. There are platforms that offer the service much cheaper and easier to manage, and many small companies for which the web is not their main channel (or do not need high capacities) can opt for this option. It is common in these cases that the person waits for the hosting period to expire before migrating.
  • Another option is because you want to clone a website. In this case you may want to make a test or demo version using the main website as a base. This way the technical changes can be applied on the demo site to see if they work and later taken to the real web environment. This operation has the advantage that there are not many steps to make the transfer and it is not extremely critical, since the final web site will not be available in production.
  • The last one is due to low performance and lack of hosting tools. For example, there are hosting services that do not provide SSL data encryption, or backups, or the ability to create subdomains. For a high traffic website that needs high availability and protection (such as an e-commerce site with a high volume of sales) it is often necessary to migrate to more powerful services or to dedicated servers specifically.

Steps to follow before migrating WordPress

  1. The first thing you should do is to update the entire website, both themes and plugins.
  2. By having everything updated you should verify that the site is still working properly and that there was no unwanted change or error in the site.
  3. Then you must review the tools of both the old (current) hosting and the new hosting where you want to take your WordPress.
  4. When you are on the server you must verify that you have compatibility between the WordPress installation services. You can check if both hostings use Cpanel or use DirectAdmin* and if they have the option or tool to make a transfer of the website.
    • If so, you will be able to perform the migration by following the steps in “Migrate with CPanel”.
    • Otherwise, you will have to migrate manually as explained below.

*CPanel and DirectAdmin are the two most widely used shared server managers. Another very common option is Plesk. Any of the above three are easy to manage and user-friendly. Other options you can find, depending on the hosting you hire (although they are much less common) are Webmin, Interworx, Virtualmin, CentOS… In this tutorial we will use CPanel as an example, but the steps for DirectAdmin and Plesk do not vary much.

Migrating a WordPress step by step

We will explain several methods to export a website developed in WordPress to another one.

The first way of migration that we are going to explain in this tutorial is through the Cpanel or Directadmin of the hosting you are working with.

In any WordPress installation you will have to migrate two elements:

  1. Site archives
  2. The database

Let’s see how the migration is performed in each case.

Migration via Cpanel or Directadmin

The steps in this case are as follows:

  1. First you have to login to the hosting and go to the “WordPress installations” section. There look for the website you want to export and click on the backup option. The backup may take more or less time depending on the size of your WordPress installation.
  2. Once you have made the backup, the next thing to do is to download it from the hosting administrator to your computer. To do this you must go back to the backup section and look for the backup of the site. Once you are there, you will be asked to download it to your PC, and once you are done with this you must go to the panel of the new hosting.
  3. Once you are on the new hosting, go to the “WordPress installation” section in the administration panel. In this case, instead of having the tool install WordPress from scratch, you will click on the “use another WordPress installation” option.
  4. In the next step you will have to upload the files for the new installation, the administrator will copy all the files (also the database) to the hosting and you will have your site active on the new hosting.

As a last step you will only have to change the DNS of the domain for the new hosting, as you will see later in this tutorial.

Manual migration of a site

If you don’t have CPanel or DirectAdmin it’s ok, you can migrate a WordPress in no time by following the steps below.

Option 1: migrate files via FTP

Filezilla logo

There are other ways to back up files without using the hosting itself, (for example, if the system you use is not CPanel or one of the other systems mentioned above).

The most widely used of these is via an FTP connection. For this you must have a suitable program, the most used and recommended is

Once you have the program installed on your PC, look for the access to the FTP connection on the hosting administrator’s desktop. Once you have them, establish a connection with the server and you can download the files of your WordPress installation: you will have to download everything inside the public_html or httpdocs folder (depending on the hosting you use).

It is recommended for this type of backup that you have a good internet connection and plenty of time, as it usually takes a long time to complete: the FTP protocol is somewhat slower than a normal connection.

As a last step upload the files to the new hosting and you will be able to move on to the database migration part.

Option 2: migrate the files by creating a .ZIP file

Another option to get the files is to compress the folder of the WordPress installation you want to migrate in a .ZIP, through the file manager. The vast majority of hostings allow the handling of .zip files within the server’s own file system (create archives and unzip previously uploaded files). Right-click on any file or directory and you will see several extra options appear.

In this case simply create a .zip file of your WordPress files to migrate, and once you have the ZIP file you can upload and unzip it on the new hosting.

Important: when the .zip has extracted all the files, delete the original .zip file.

Download the old hosting database

Now that you have the files in your new hosting, you only need to export the database:

  1. To do this you have to go back to the current hosting and look for the PHPmyadmin panel.
  2. Once inside the database corresponding to your website click on the “simple export” option and choose the SQL format
  3. Save this file on your PC.
Which database corresponds to a specific website?

If you only have one website it’s easy: there will be only one database. In case you have several WordPress installations on that hosting you will have several databases (one per website).

Normally PHPmyadmin and even the hosting itself tells you which website or domain each database corresponds to, but if you would like to check for yourself or can’t find this information, you will find the database connection information in the wp-config.php file of the WordPress installation you want to migrate.

In this case, open the file and search for terms such as “DB”, “database” or “MySQL”. The name (and connection data) of the database you are interested in will appear there.

As you will see below the wp-config.php file must be modified to make a correct migration, so we will go to that file when appropriate.

Upload the database to the new hosting

Once the database has been downloaded to our PC we will have to load it in the new site. To do so, we will:

  1. In the new hosting we will enter PHPMyAdmin and create a new database. Save the data of the same: name, user and password.
  2. In the same database, look for the “Import” option and load the file you previously saved in your PC.
  3. Leave all the default options and click “Continue”.

Connect WordPress to your database

The last step is to connect your newly imported WordPress to the database you just imported.

WordPress stores the database connection information in the wp-config.php file. Inside this file you must replace the name, user and password with those of the new database.

If you have followed the steps correctly, you only need to change the DNS of the domain (last step).

Migration via WP All-In-One-Migration plugin

Another way to migrate a website is through WordPress itself using a plugin.

To do so, you must follow the steps below:

  1. Install a plugin called All-in-One WP Migration, which will allow you to download the entire WordPress installation. You can choose to download it to a cloud (such as Google Drive) or to an archive. For convenience, the second option is more advisable.
  2. Once you download the site, you must install WordPress from scratch on your new hosting.
  3. Once inside the newly installed WordPress install the All-In-One WP Migration plugin there as well.
  4. In this case, click on the “import” option and select the previously downloaded file.
  5. The plugin will start copying all the files and data from the website and the web page will be imported.
  6. The last step will be to update the permalinks structure in the new WordPress: use the same settings as in your old hosting.

To conclude, there are many ways to migrate a WordPress website from one hosting to another. As you could see there are very fast ways like with the Cpanel backup and the WordPress plugin. Also slower and more laborious manual ways such as exporting the files from the old installation to the new one.

It is always advisable to use automatic means of migration. Exporting data manually by ZIP or FTP should be the last option.

Redirects the DNS of the domain

Once you have your WordPress files and database on your new hosting, the last step will be to modify the DNS of your web domain to point to the new hosting.

  1. If with your migration you have also taken the domain to the new service (the most logical option, since you manage everything from a single place) you have probably already been asked to make this change.
  2. If on the other hand you manage your domains through a third party (GoDaddy, Namecheap…), you will have to go to that platform and update the DNS of the domain for those of the new hosting.

Want more tutorials like this one?

If you found this tutorial useful and want to read more articles like this one, check out these other blog posts.

Consultor Senior | + posts

Especializado en la redacción de contenidos y la gestión de blogs, Desde 2018 investigando y dándole a las teclas para convertirse en un auténtico maestro del WordPress y el SEO on-page.

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed


Last entries