How to Migrate Your WordPress Site to a New Host
Migrate Your WordPress Site
Are you facing issues with the current hosting service provider? I have personally encountered few issues related to the hosting environment and it can certainly give you a headache. Some people prefer taking the professional help and some use the service by a new host but, if you know how to migrate your WordPress site to a new host then it is the best way for you to proceed.
You can use more than one method to migrate your WordPress site to a new host. We are going to tell you about the easiest way for migrating WordPress website to a new host. First of all, you need to take a backup of all the files of your website.
Before you go on to make changes, make it sure that you are taking the complete backup of your files. You can also use any plugin for taking backup of your WordPress site.
Exporting the database
It is another very easy step and you can easily export the SQL file for the database. All you need to do is to login into the cPanel account and then you need to open phpMyAdmin. From there, you need to select the database of your website that you have installed and hit the Export button.
You will get the SQL file and it is what you need to continue. Once, you will have the SQL file and the website files that you have downloaded through FTP then you will be ready to move on to create a new WordPress database on a new host.
Creating a database on a new host
All you need to do is to login into your new host cPanel and there you need to create a new database like you did before with your previous host. You need to open MySQL database and there you will have to create a new database of your website. You will have to create a new MySQL user with a password. And, you need to make it sure that you are remembering it or saving it someplace safe along with the name of the database that you have created as you will require it in next few steps.
Editing the wp-config.php file
The next thing that you will have to do is to edit the wp-config.php file.
It is time to open the files that you have downloaded from your previous host through FTP. Open a file named wp-config.php from that file. This is the file that holds a key to get things back on track.
You will have to make three changes in this file. All you have to do is to open a file and start making these three changes. Before you go on to do any editing of this file. Make it sure that you are keeping a copy of the file.
Change the Database name in the code. I have attached a screenshot for your better understanding. Just find the line where you can change the database name. You will need to add the name of the same database that you have just created in place of ‘db_name’.
Next, you need to be sure that you changing the database username by following the same path and finding the line where it states ‘db_user’. Insert the username that you have just created for your new database.
And, finally, you need to be sure that you are inserting the password for the database that you have created on the new host. Find a line where ‘db_pass’ is written and overwrite it with the password that you have created.
Importing the database
You need to go back to the phpMyAdmin from the cPanel and then you need to select the database that you have created a few minutes ago. You will find the import button in the same row. Click the button and choose the SQL file from your local computer. After selecting the file, click the GO button and import will start.
Uploading WordPress files to a new host
After importing the SQL file, you can move on to the upload the WordPress files to your new host. You will have to use the same process to do that. You can connect to the FTP program and select the folder where your website’s files are going to be placed.
Make it sure that you are including the updated wp-config.php file that you have recently edit. After uploading the files, you are all set.
Defining your new domain
If you have created a new domain then you might face problems. Here is how you can resolve the issue only if you have created a new domain and imported the database from the previous domain.
The last step that you are going to take is to make it sure that you are linking your database and files to the new domain. You will have to go to phpMyAdmin and you need to click on the database that you have just created.
You need to find the table named wp_options and click it. You need to make changes in the first two options named siteURL and home. Make it sure that you are replacing the option_value by your new domain name.
It’s all done and you are ready to move on with your WordPress website on a new host.
Leave a Comment
You must be logged in to post a comment.