Don’t be scared. Moving web hosts isn’t as difficult as you might think. It might seem quite technical if you’re fairly new to websites and WordPress but it’s really not if you break it down. Which means you’re not stuck if you feel you’re not getting the best service or support from your current web hosting provider. By the way, we did a massive survey of most of the major players in the WordPress hosting space, so if you’re looking for a new hosting provider, you can check it out here.
In this video we move a real, live site for one of our WP Eagle regulars. Gareth was having trouble with page load times and general page speed issues on his Amazon affiliate site. We ran his site through the Google Page Speed Index tool and it kept returning a weird error. After countless hours of frustration and troubleshooting with HostGator, he decided to move host and asked if we could help.
We’re using the manual method of copying the site files and database, downloading them to your computer and then uploading them to your new host. We are not using a plugin. There are plugins out there and we have used Duplicator, UpDraft and xCloner in the past but as with all plugins, they are prone to issues, so the manual method is more reliable. And there’s no FTP involved, which is good because I know some people are just plain freaked out by it!
We are moving the site from HostGator to SiteGround. Here we go…
On separate tabs open your control panel for your current host, your new host and your domain registrar.
On your current hosts control panel, find FILE MANAGER, click, and then you’ll see a list of all the files and folders on your hosting. If you only have one website, you will probably find all your files and folders in the public_html folder. If you have more than one website, select the right one and click on it to see all the files and folders.
Select all the files (usually a link option on the control panel page), compress the files (again, usually a button or link in your control panel) and then select zip archive when asked.
You will now have a new zip file in your list of files and folders. Select the file and click to download to your computer. It’s a good idea to have already created a new folder somewhere on your machine where you can download the files to.
Go back to your host control panel to download the database. Find PHP MyAdmin. If you only have one database, happy days. If you have more than one database and you’re not sure which one belongs to the site you are moving, pop back to your files and folders and open the wp-config.php file. You will find the database name in the first line of code.
Check the size of your database. Anything over 50MB could create issues, so break the database into two (or more) downloads. In this instance, we separate the wp_postmeta table, which is 29MB alone. Select the part of the database you want to download, click EXPORT and download the SQL file. It is a good idea at the point to rename the database so you know what the file is. Here we’ve used wp_meta_posts so we can identify what it is.
Now select the rest of the database to export, remembering to take out the file you have already downloaded.
Everything is now on your computer. Now you need to start uploading the files and database to your new host. Go to the cPanel for your new host account. We’ll upload the files first, so find File Manager and go to the document root for your domain.
Your directory should be empty. If there are files that are placed there by default by your hosting provider, you can just delete them. Click Upload and choose your file (not the database ones). Once your zip file has been uploaded you need to extract the files and folders from it. Highlight the zip file, click Extract and Extract Files. All the files from the zip archive will then appear. You can delete the zip archive folder.
Now it’s time to upload the database. Go back to your new hosting account control panel and find MySQLDatabases. You will need to create a new database. Call it whatever you like. Be sure to make a note of the database name. Create a user. Again, put in whatever you like and then generate a password. Again, note it down. You will need the details. Once you’ve created the database and user, scroll down and add the user you’ve just created to the database.
Your database is now ready for to upload the files to. Go back to the control panel and find PHPMyAdmin. You will see that it is empty. Select Import and choose (one of) your database file(s). You might get a timeout error. Don’t worry, just make sure that the database has been uploaded. More often than not it has. If you had more than one database file, repeat this step.
Now you need to update the wp-config file so it matches the new database details. Easiest way to do that is go back to your hosting account’s File Manager area, find the wp-config.php file and press Code Editor and Edit. You will need to change the database name, username and password that you noted down from step 10. Save your changes and that’s all done.
Now you need to update your DNS settings. In this case, the domain is hosted with GoDaddy. It’s a similar process for most domain name registrars. You’ll generally update the nameservers however, if you are running an email address through your domain and the email is hosted with someone like Office 365, you will just want to change the A record. If in doubt, ask your domain registrar. Find your new nameservers in your new hosting control panel. In this case it is SiteGround and the nameservers are:
Replace the old nameservers with the new ones and click Save. That will take a little while to update. Once that’s all done you can login in to your site on your new server.
This final step is about SSL certificates. As you may have seen from our recent videos, SSL is important and more hosting providers do offer a free SSL certificate. You can find out more about SSL here. In this case, SiteGround does offer an SSL certificate that can be installed at the click of a button. Go into the cPanel for your new hosting and find the security/SSL section. In this case it’s the Let’s Encrypt icon. Make sure the correct domain is highlighted and click Install. Easy as that.
In this case, moving the website from HostGator to SiteGround has had a significant impact on the page speed score. Instead of that pesky error message, the site is now reporting a very respectable Google speed score of 71. So the move has paid off.
We did an epic study on WordPress hosts and compared all the available options to find the best hosting providers based on price, support, speed etc. You can read the full review here.