There are many reasons to transfer your WordPress site to a new host. It could be due to increased traffic to your website in an aging server or host or worse, your host might have been unreliable from the start. Regardless, transferring a WordPress site is something you’ll eventually need to do as you scale up or upgrade your blog or website.
Knowing how to transfer to a new host securely and with little to no downtime can be a crucial skill, even if you don’t need to do it right away. Thankfully, we’re here to guide you on that process. It’s a rather simple activity which should only take a short while depending on your tools at hand or internet connection. Here’s how you can do it thoroughly in ten easy steps.
1. Pick a new hosting account
First thing’s first, you have to choose well. Different hosting accounts serve different purposes. Generally, Bluehost provides the best balance between reliability and speed when it comes to hosting providers. Even WordPress recommends that one. You can still check out other close competition such as the slightly slower (by a hair) HostGator Cloud or A2 Hosting which is faster than both but has less uptime.
The choice is up to you and you should choose according to your needs. After picking your new host provider, don’t break it in just yet; proceed to the next step in this list.
2. Create a backup of your website files
Part of the big work of the actual migration is backing up and that’s what you’re going to be doing next. Log in to your old web host’s control panel and look for the File Manager there. Once inside, locate all the folders that contain all the WordPress content. As such, these can include not just the core files but also the images.
Those are usually located in the public_html folder. Usually, the WordPress root will look like the this below:
You can simply select all of them and compress them into a zip folder; the procedure varies per operating system but it’s as easy as right-clicking in Windows, selecting “Send to” and then selecting “Compressed (zipped) folder. An alternative to this is using an FTP client like Filezilla, just make sure that your account there has the proper access privileges.
3. Disable plugins
Before you backup your WordPress configurations among other things, you will want to turn off the plugins first. Plugins may be better and more foolproof these days, but you can never be too careful. After all, you’re migrating your whole website to another host or server.
Minimizing all semblances of errors is a must when doing such a critical task. To do this, simply locate the plugins section in your WordPress dashboard and bulk deactivate all of them by ticking the topmost checkbox and selecting “Deactivate” from the Bulk Actions dropdown menu. One exception would be if you have or use the WP-DBManager WordPress plugin. You might need it for the next step; so leave it on if that’s the case.
4. Backup your WordPress database
Now, you’re ready to backup your WordPress database. There are two ways to do this. One is with a tool provided by your hosting provider called phpMyadmin and the other one is with WP-DBManager (assuming you didn’t disable it).
To use the phpMyadmin method, log in to your old hosting account and select the phpMyadmin or manage MySQL option in order to access your databases. You can then create a backup of your WordPress database and download the SQL copy to your computer. The procedure should look similar to this:
If all goes well, you should not have an SQL file downloaded to your computer. Meanwhile, for the plugin method; log in to your original WordPress installation admin; hover over the “Database” menu item; then, select “Backup DB.” You will be presented with more options for backing up. It looks like this:
Once the backup is done, navigate back to “Manage Backup DB” and you’ll be able to select and download the backup there.
5. Upload the downloaded backup zip files from step 2
Remember that zip file you have from step 2? The website files? We’ll now be uploading them to the new hosting account. Simply log in to the new account and upload the compressed file you made from step 2. Afterward, you can extract them to the directory.
If everything was done smoothly and correctly, your old website data should not be present in the new hosting account. That means the WordPress content and images or other stuff you migrated.
6. Create a new database
Once you’ve carried over the backup of your website content to the new host account, you’ll need to create a new database. Lucky for you, the regular web hosting account provides a built-in Database Setup Wizard that will guide you through the creation of a new database.
It’s easier and faster this way. You’ll be prompted to select the database’s name, username, password, and other security details and privileges. You want to make sure that the user is given or assigned all the privileges. Such details can be difficult to remember so writing them down on your notepad (physical or digital) can be lifesaving.
7. Restore the backup database from step 4
Once you’ve created a database for the new host, it’s time to restore your old database from step 4. In your new host, just select the phpMyadmin. Since your new database is, well, new, you’ll notice that it might now have any tables. That will come from your old database.
You can select the Import tab to import the old tables into your new database. You can search for the old database backup faster by clicking on “Browse.” Search for the backup you downloaded back in step 4 and then select “Go.” This will begin the process during which would be a good time for a cup of coffee as it will take a while depending on the size of the backup file.
Some problems might arise in the form of larger file sizes. There is only a maximum file upload size for restoring backups. Anything larger and you might have to call your new host’s tech support for more upload allowance.
8. Edit the wp-config.php file
Once you’ve migrated everything, it’s time to configure your new hosting account. Go to the account’s file manager and locate the wp-config.php file within the root directory. Open that one and it will show you your database credentials. You need to edit this file according to their corresponding tags. Here’s an example:
Before you do that, a backup of the file is necessary, so make one before tampering with it. You need the backup in case something goes wrong. Replace the necessary info with the data you entered during step 6 (username, password, etc.). Just make sure to enter everything correctly, otherwise, errors might pop up.
9. Assign new name servers
Everything is nearly set now but we’re only nearly done. The final essential step would be to change your name servers so that they will lead to your new host provider. They look like this: ns234.hostprovider.com & ns235.hostprovider.com and you only need two of them (assuming three or more are displayed).
Often, you can find this information along with the account details or statistics but if they’re nowhere there, then you might have to contact your new host provider’s technical support.
10. Conduct some tests
That’s pretty much it. You’re most likely done at this point (assuming no errors pop up; if so, double-check the wp-config.php file). Think of this step as an epilogue. Try testing some things out like the plugins, the URL, the dashboard, backups, and saving functions.