If you know the correct steps, transferring a WordPress site to a new host isn’t too difficult.
But if you miss just one step, it could cost you!
Read on to learn the process I go through to transfer my WordPress sites.
1. Download current site via FTP
FTP, or File Transfer Protocol, is how you can download files from your site. My favorite program for doing this is called FileZilla. You will need to download your entire website, not just your theme.
2. Export your WordPress database from phpMyAdmin
phpMyAdmin is a visual interface that allows you to manage your databases. If you use Hostgator, you can log in to your cpanel and scroll down a bit, and you should see a phpMyAdmin link.
From within phpMyAdmin, simply click the database that corresponds with your WordPress site and download it. If you have multiple WordPress sites on your host, you can open up the wp-config.php file that you downloaded with FTP to see what the name of your database for this site is.
Once you’ve selected the database, click to the “Export” tab at the top and export it to your computer.
3. Upload your site to the new host with FTP
Clear out any “coming soon” temporary pages your host might have put there, and then upload all of the files you previously downloaded.
4. Log in to your new host’s cpanel and set up a new database
Again, if you use Hostgator, this can be done within the cpanel, by clicking “SQL Database Wizard.”
You will first need to create a database, then you will create a user for that database. Make you you make note of the database name (including the part that comes before the “_”), the username, and the password. Also, be sure to give the user all privileges when you create them.
5. Log into phpMyAdmin on the new host and import your database
Once you’re in phpMyAdmin, you will see a link on the left for the new database you created. Click it, and then go to the import tab at the top and import the SQL file you downloaded earlier.
6. Change your site URL in the wp_options table, if necessary
In phpMyAdmin, you should see a link in the left nav for “wp_options,” assuming you are clicked in to your database. Click the wp_options link.
From here, you should see a “siteurl” line in the table. Click the pencil to edit it, and change it to the new website address. If your site address is staying the same, you can skip this step.
7. Edit your wp-config.php file
This is the file that essentially hooks up your database to your website, so it’s important not to skip this step.
Within the wp-config file, there are lines for you to type in the database name, username, and password. You can leave everything else as-is. With Hostgator, you will always keep the DB_HOST as “localhost.”
8. Upload your edited wp-config file via ftp
Since you changed the file, you will need to re-upload it.
9. Point your domains DNS to the new host
I like using GoDaddy for my domains, and one cool feature with them is that domain propagation only takes 5 minutes or so. With other hosts it can take up to 48 hours.
10. Log in to your new site and configure the settings
Once you log in, go to the general settings and confirm that your site URL and blog URL are both correct. This will only apply if you changed the site’s domain or moved it from being within a directory to being in the root.
The first few times you follow these steps it will be a little tedious, but after you’ve done it a few times, you will get into a groove and be able to transfer your sites without having to think too much about it. 🙂
Looking for more WordPress training?
I recently launched a step-by-step beginner’s WordPress training course; click here to check it out!