WordPress Migration: You may think that moving your website to a new host is a complicated job, but actually, it is not. You just wanted to move to a new host because you’re not happy with your current hosting provider, or your site had grown enough or need a more reliable host.
There would be any reason for the decision. To prevent downtime and get things done correctly, people may hire a professional or use the service offered by the new host as a part of the package.
If you spend a little time on your website and follow proper guidelines, migrating is nothing to be worried about. In this tutorial, I’ll show you step by step process to move your website to a new host, making it easy for you to do it on your own.
WordPress Migration: Migrating your WordPress Website to a New Web Host
Let’s walk through the process:
Step: 1 Backup your website:
The first thing is to make a complete backup of your website. There are a lot of plugins out there that helps you to make a backup. Some of them are –VaultPress, BackupBuddy, BackWPup, or WordPress backup to Dropbox.
Backing up your website, however, needs a manual approach. You can use FTP client like FileZilla, connect to your host and download all the files from your website root directory to your local computer. This includes hidden files like .htaccess as well. Enable the visibility of hidden files and download them.
Step 2: Download your website database:
Login to the cPanel of your web host and open the phpMyAdmin application. Choose the database of your website on the left-hand side, and click on the export tab on the navigation menu. This will download the entire database of your website.
Now, you’re done with backing up of your website files and database export, you’re ready to move on to the next stage.
Step 3: Create a new database on your new host:
You need to create a room for WordPress installation on your new host to import your SQL data. Login to you new host and connect to the cPanel application. I’m using MySQL Databases application. Contact your host, if it doesn’t have that application running.
The steps to create a database are quite simple:
- Open MySQL Database and create a new database with an appropriate name for your website.
- Create a new MySQL user (with a secure password).
- Add this user account to the new database and grant it All Privileges.
Write down the database name, the new MySQL username and its password. You will need them soon.
Step 4: Edit wp-config.php file:
The wp-config file is the one that controls the connection between your WordPress website and the database. Look for the file from the downloaded website files. On the safety side, make a copy of the file and store it somewhere on your computer. Now, open the file and change the database name, username, and password.
The db_name is the MySQL database of your old web host. Change it to the new database you’ve created.
The db-user is the username of your old host, change it to the new user name you’ve just created.
Database User Password:
The db-password is the password for the old host, change it to the new password you’ve just created.
Step 5: Import your Database:
Open the phpMyAdmin from the cPanel of your new host and select the new database on the left-hand sidebar. After it opens, click on import tab from the navigation menu and upload the SQL file that you’ve already downloaded.
Make sure to un-check the Partial Import check box, make sure the format is set to SQL and then click the Go button. Depending on the size of the file, time may vary.
Step 6: Upload WordPress files to new host:
You can upload the WordPress file by accessing the File Manager from the cPanel of your new host or through FTP client.
Connect to your new web host using your FTP program and upload the files to the public-html folder of the directory.
Step 7: Defining and linking new domain
It is the most important step in the process. Once you have transferred the WordPress files and database to the new server, you’ve to rename the URL’s that are pointing to the old domain.
Use Search and Replace plugin to replace all the old domain name and file name to the new domain name instantly.
Make sure you are running the search and replace on the new domain you are transferring the site to not the old one.
Step 8: Changing DNS names:
If you’ve your domain registered with other hosts, then you’ve to configure your domain’s DNS settings. They will be set to point to your old host and you will need to point the correct records to the new server IP address. Contact your new host help section to do this.
Step 9: Redirect traffic to new domain:
If you’ve chosen a new domain for your old website, then redirecting them to the new domain is essential. You can perform this action by following this tutorial, where I’ve explained clearly on how to redirect SEO traffic from old domain to new domain.
I hope that this tutorial has helped you in some way. If this tutorial helped you, you may share it to friends, as it may reach the needy. Share your experience in the comments section below!
- How to change your domain name without affecting website traffic
- Save $50 Discount on DreamHost WebHosting – On all Hosting Plans