ZachSwinehart.com

10 Steps to transferring a WordPress site to a new host

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.

All done!

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!

5 Responses to 10 Steps to transferring a WordPress site to a new host

  • Gary Owen says:

    Zack its nice to see all the word press tips for people like me who need that bit extra but no time to go through long video’s.

    Keep it up.

    Gary Owen.

  • David Fisher says:

    Or, use the EXPORT Plugin for WordPress and it will save to your hard drive an XML file with most of your content (images are not included but their image-name and location URL/Pointer is).

    Then, go to your website (before transfer) and open each page and highlight the page’s content (not the sidebar) and copy-paste to WORD.

    You have your theme in any event.

    Go to new website: 1) load your theme. 2) IMPORT your XML (there is a plugin for this that comes with WP.) This will get you back to where you were sans images. 3) Note that if you have images embedded in your text on each page, then you will have to re-upload and embed them. That is what the WORD file is for – it has the size, location and exact image itself in the Word file so you don’t forget where the images were/are as reminder. You cannot copy and paste from Word though. Word is a reminder of what the whole thing was to look like as it will have it exactly. This assumes you have the images on your hard drive in the first place as you should (before you uploaded them in the first website.)

    That should do it.

    • Hi David, thanks for commenting!

      That way certainly is easier, but I don’t like it as much because of the image issue you mentioned, and also that I don’t believe it exports plugin settings, does it? (It’s been years since I’ve done it that way)

      I know my process may sound involved, but it only takes me about 20 minutes these days, and to me, re-uploading all the images sounds like more of a pain than my process. But perhaps for sites with only a few pages your process would be quicker. :)

      • David Fisher says:

        Well, WordPress is essentially for people who do not know (and often do not care to know and do not have to know) the “techy-stuff”. So, the images are a fuss in that you have to upload them again. But, you don’t need to know anything at all about MySQL databases and all that either. (Add that learning-curve to some manual uploading of images and I think my method is still better as SQL/MySql was never intended for humans to know how to use. Klingons were born with this knowledge, though.)

        Copy/Pasting the pages’ content-area to Word is an excellent way to keep track exactly what the content part of each page was to look like. And this appeals to the average WordPress user better. Easy to do, requires no special skill-set, no coding, and most people can do a copy/paste without a college degree.

        I never looked at the plug-in settings issue you mentioned. So, I guess those settings are not contained in the XML file – but – WordPress.Org itself is the author of the EXPORT/IMPORT operation so my guess is that maybe it does hold that info.

        Do and EXPORT on one of your WordPress sites saving the XML file to your hard drive and take a look at it. It will reveal the answer to your question. Oh, and I never used any other Export/Import/Backup Plug in except WordPress.Org’s – there are others that probably are terrific considering the importance of this task.

Add Comment Register



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recent Comments