How To Move Your WordPress Website To A New Hosting Company
Tired of your current hosting company and want to move?
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 your WordPress website to a new host (without breaking everything).
*For my higher traffic sites that warrant paying for better customer services, I use InMotion Hosting. See their plans here. You can also read a comparison between HostGator & InMotion, 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.
Part 1: Set Up New Host – database, folder, and add-on domain
- 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
Part 2: Get Your Old Stuff – old database, and the entire old folder
*Note – before getting any of you 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
Part 3: Upload Website Files To New 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
Part 4: Fix Configuration Files, Re-Point Domain, Final Check
- 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
Related WordPress Resources on ShivarWeb
- How To Set Up a WordPress Website from Scratch
- How To Set Up an Ecommerce Website with WordPress
- Beginner’s Guide to WordPress Dashboard & Initial Settings w/ Video Tutorials