Not happy with your current web host? Looking forward to migrate your WordPress site to a new one but don’t know how to do it?
Here in this article, I’ll break down the process of migrating your WordPress site to a new web host in simple steps and following them would make the process a walk in the park.
Before we dive into the actual thing, let me ask you something. Why did you decide to go with a new web host? And what are the chances of you not changing the host again in future?
If your answer to the second question is “low”, that could only mean one thing. – You find it hard to choose the right host for your WordPress site. I suggest you read other hosting review articles on my blog to get an in-depth understanding of the features provided by different providers.
Enough fooling around already, let’s cut to the chase.
How to migrate your WordPress site to a new web host?
#1 Backup your WordPress site
So, first things first. Create a backup of your WordPress site. Why you ask?
Do you plan to recreate the content including posts, media, users, etc. when on the new server?
So, to get your site running with the same functionality even on the new server, you need to create a backup for your WordPress site.
Now, to back up your WordPress site completely, the Rock needs you to do two things right now
- Backup your WordPress files
- Backup your site’s database.
- Download WordPress files
The simplest way to do this is via an FTP client. Using an FTP client like FileZilla, connect to your web server using the FTP details that can be found in the cPanel of your host.
These are your WordPress files.
You can find them under the public_html directory.
Browse to the directory, select all the files in this directory and click download.
It might take some time for all these files to download depending upon the media and other content on your WordPress site. You don’t want to wait looking at the screen while your files are downloaded. While these files are being downloaded, let’s move to the second part of the backup.
#2 Backup the database
No WordPress backup is complete without backing up the database. The database has all the data related to the site admin, users, comments, etc. To dig deeper into what actually consists a WordPress database, refer to my article about Backing up your WordPress site.
Log in to your cPanel on your web host and browse to the Database section under which you’ll find phpMyAdmin.
Go to phpMyAdmin, and click on the Export tag.
Select the output format as SQL, add the file name template, choose the file compression that you wish and then click Go.
The backup file will be downloaded to your computer.
Now we are half through the migration of your WordPress site.
#3 Create a new WordPress Database on your new host
To complete the migration, you want WordPress installed on your new host and for this you need to import your MySQL data into a database. That boils down to one thing- Create a database.
Log in to the cPanel of the new web host that you wish to migrate your WordPress site to. Under the Database section, click on create a new database.
Here, enter a database name for your WordPress site, a username and a secure password to authenticate the right user accessing the database files.
Click Create database.
#4 Configuring the wp-config file for the new database
To establish a database connection, you need your wp-config file to be configured correctly.
Now that we have downloaded the WordPress files to from the FTP client to our computer, it’s time to say them Hello!
Here is the folder containing all the files from the WordPress directory.
Open the wp-config file and edit the database information.
You can see here; I have removed all the previous information like database name, user, password and host.
Add the new database name the one that you created on your new web host.
Also get the hostname from the database details on your new host and add them here.
Enter the new database password.
Make sure all this information matches the database details that you created on your new host. Messing this up may result in an error- Error establishing database connection
#5 Import the database
Now it’s time to load your backed up SQL data to the new database on your new host.
Go to phpMyAdmin on your new host and click on the import tag.
Click Choose File and select your SQL database file from your computer.
Select the Format of imported file as SQL and click Go.
Time to seal the deal.
#6 Upload you WordPress files to the new host
Now that you have most of the things in place having imported the old data to the new host and configured the wp-config.php file, it’s time for the finisher the Rock Bottom!
Open FileZilla and connect to the new web host.
Browse to the location where you have downloaded the WordPress files.
Right-click on the directory and select upload. It’s just a matter of time, and your WordPress files will be uploaded o your new server.
And that’s how the cookie crumbles!
That’s how you migrate your WordPress site to a new web host.
Some key points
Your domain’s DNS settings gotta be configured before you could Bring It with your website. So, to access your site, get those settings configured.
You can find all the information related to this with your domain registrar.
These changes can take up to 48 hours, so make sure you apply them when you could possibly expect low traffic.
Also, don’t get fancy and start making changes to your site during this time period.
Once it elapses, you are free to access your site and make all the changes that you wish.
If you see, this article actually made the complex looking process of migrating your WordPress site a simpler one breaking it into few simple steps.
Also, refer other WordPress related articles on this blog. For a change, smell what theblogtip.com is cooking!