It is basically easy to migrate our WordPress site from one hosting provider to another. However it is necessary to carefully follow some procedures in their correct execution schedule and pay attention to some advice.
We know there is more than one method to migrate WordPress, one of them is by using one of the plugins created for this purpose, however in this tutorial, we will talk about the manual method.
Two important tips to remember
- The old site is deleted only when you are sure that all data has been transferred to the new one and that everything is working correctly
- A copy of all the data present in the old hosting must be kept in a secure medium (the PC or an external USB drive)
Let’s migrate WordPress
1 In the new hosting, regardless of the management panel (cPanel or Plesk) via Softaculous, or the applications available from Plesk, we install WordPress. In this way, by carrying out the correct procedure we will have all the management and backup functions of softaculous and / or plesk dedicated to WordPress available
2 From the old hosting, using its management panel (cPanel or Plesk) or via FTP, we download all the contents of the main folder of the site, or (if you have configured WordPress in the old hosting), the entire contents of the folder used from WordPress. We will temporarily place these data in a folder dedicated to the purpose on the PC and immediately afterwards, if possible, we will make a duplicate in an external USB disk (backup).
3 The time has come to export the data from the old site database. We will do this using PHPMyAdmin which we find availability with both cPanel and Plesk. We insert the exported file in our dedicated folder that we created a little while ago on our PC, it will then be used to upload this data to the new database that we have already created in the new hosting / site when we have installed WordPress, if possible, we will make a duplicated to an external USB disk (backup).
4 Let’s start UPLOAD the contents of the WordPress folder that we saved on the PC on the new hosting, using (as we previously did for the download) the management panel or via FTP. Then copy and paste all the WordPress files and folders in the main folder of the new hosting / site or in the folder dedicated to WordPress (based on the installation configuration we have previously chosen), overwriting the original files we installed with the files that we are transferring from the PC. Once this operation is finished, let’s move on to the database.
5Let’s import the database. Also in this case we will use PHPMyAdmin which we will find availability from our Plesk or cPanel management panel
6 We configure the WordPress site to work on the new hosting / server. The next step is to configure your WordPress application to work in the new space. To do this, open the wp-config.php file in the root folder (using the File management page from cPanel or Plesk) and enter / edit the following strings:
define('DB_NAME', 'user_wrdp1'); /** MySQL database username */ define('DB_USER', 'user_wrdp1'); /** MySQL database password */ define('DB_PASSWORD', 'password'); /** MySQL hostname */ define('DB_HOST', 'hostname');
Replace those values with the database name, username and password.
The host name should be replaced with localhost.
Then save the file and your WordPress site should be up and running from your new hosting account.