Tired of your current hosting company and want to move?
A while back, I got really tired of GoDaddy hosting several of my small projects and decided to move many of my small websites over to HostGator.
But I procrastinated for a while – because the idea of moving several websites was quite daunting – and I couldn’t find any good visual resources on exactly how to move it (without breaking everything).
Here’s your guide to moving the WordPress website that you’ve built to a new host (without breaking everything).
I recommend HostGator Web Hosting, especially for starter sites or sites on a budget. Sign up here for a 60% discount.
*For my higher-traffic sites that warrant paying for better customer services, I use InMotion Hosting. See their plans.
You can also read some of my other hosting reviews, or read my guide to determining the best WordPress hosting for your project. The instructions here are the same for any host that runs cPanel.
Step 1 – Set Up New Web Host
- Log in to your HostGator cPanel
- Use MySQL Wizard to create a new database + user (save the info)
- Go to File Manager and create a new folder in the publichtml folder
- Go to Add-On domain and add the domain name, and point it to the folder that you just created
Step 2 – Backup Your Website
*Note – before getting any of your old stuff, you can save time by deleting any unused themes, plugins, themes, and media from your site. But be sure once you begin this Part – you don’t make any changes at all to your website.
- Log into your old host (like GoDaddy)
- Navigate to your databases, log into phpMyAdmin
- Select the database of your WordPress site, then Export
- Click on ’select all’ and ‘SQL’ from the Export menu
- Select ‘add Drop Table’, ‘add Auto_Increment value’ and ‘enclosure table and field names with blackquotes’ from the Structure menu
- Select ‘Complete inserts’ and ‘Use hexadecimal for binary files’ from Data
- You can leave all the other values at their defaults
- Once all those settings are selected you simply click on ‘save as file.’
- Now open FileZilla (or any FTP client), and log into your old host
- Select the folder of your website
- Download the entire folder to your Desktop
Step 3 – Upload To Your New Web Host
- Go to Databases –> phpMyAdmin and login
- Select the database that you created in Part 1
- Import the downloaded database
- Go back to FileZilla, connect to the new host
- Navigate to the folder you create in Part 1, open it
- In the left pane, open the downloaded folder from the old host
- Select everything in the downloaded folder (I use CTRL-A to make sure)
- Upload the files (not the folder) to the folder on the new host
Step 4 – Validate Transfer
- In FileZilla, look in the new host folder for wp-config.php
- Right-click and open the file with NotePad, TextEdit, or NotePad++
- Look for a section that looks like this:
/** The name of the database for WordPress */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
- Replace the bolded sections with the information from the database you set up in Part 1 –
- The database name, username, password, and if using HostGator, DB_Host will be localhost
- Save the file
- Scroll down and find your server’s IP Address.
- (next steps may vary depending on how your domain is registered)
- Go to wherever your domain is registered at, and change the A Record and www Record to the IP Address on your new server.
- Check out your website, and do a final check of everything
If you haven’t already, I recommend you sign up for HostGator Web Hosting for affordable pricing or InMotion Hosting if you want better customer support.