Maria’s Guides

Support and additional material for readers of books, articles, and digital media by Maria Langer.


Random Book Cover #1Random Book Cover #2Random Book Cover #3Random Book Cover #4Random Book Cover #5Random Book Cover #6Random Book Cover #7Random Book Cover #8Random Book Cover #9

Moving a WordPress Blog to GoDaddy Hosting Account, Part 2

Posted on September 25th, 2006 at 6:00 am · 19 Comments
Filed in: RSS WordPress Books   

Moving Your Blog Content to Your GoDaddy.com Hosting Directory

(For those of you just tuning in, this is the second part of a two-part series that explains how to move an existing WordPress blog to a GoDaddy.com hosting account.)

A WordPress blog consists of multiple parts:

  • A mySQL database that contains the content of the blog entries, comments, and other important data.
  • Content files including themes and their template files, plugins, images, etc.

This is important because in order to rebuild your blog on another server, you must have all the parts.

WordPress.com vs. WordPress Server Installation

If you have a WordPress.com blog, your access to blog files is somewhat restricted. It’s not that you can’t access them — it’s just that account access is simplified, thus making it more difficult to extract data.

For example, a WordPress server installation can be backed up, thus resulting in a mySQL-compatible backup file that can be imported into a new mySQL database. A WordPress.com blog can only be exported in XML format, requiring an appropriate importer on the new WordPress installation to import the files.

A WordPress server installation commonly stores all non-database content in the wp-content folder, including themes, plugins, and uploads. You can use FTP client software to access and download this content. A WordPress.com blog stores all non-database content in the bowels of the WordPress.com server. It’s still accessible, but you can’t just use FTP to download it all into one place. In addition, the themes are part of the WordPress.com feature set, so they can’t be extracted from that server. Instead, you’ll have to start from scratch by installing the theme you want in your new blog installation and activating it for your new blog.

As a result of these differences — and the fact that most folks who might be interested in moving their blog to GoDaddy.com are already using a WordPress server installation, this article will cover a server installation move. If you have a WordPress.com blog and want to move it to GoDaddy.com, use the Comments link for this post to let me know. If enough people are interested, I’ll write up the instructions for the export and import.

Backing up the Database

Start by backing up your WordPress database.

If you already do a complete backup regularly and haven’t made a change to your blog since the last backup, you’re already done with this step. Move on.

But if you’re living life in the fast lane and don’t back up regularly (or at all), follow the instructions my article titled “Backing Up a WordPress Blog Database

Backing Up the Content Files

Next, back up your blog installation. That’s all the files and folders in the root directory for your WordPress blog.

How you do this depends on how you can access the server.

In my case, the server is accessible by a local network, so I just used the network to open the copy a blog’s folder on the network drive to my local hard drive.

If your blog’s files are on a remote server, you’ll have to use FTP software like Fetch or CuteFTP to access the server and “get” the files. We explain how to use FTP software in Appendix B of our WordPress book.

Creating a mySQL Database at GoDaddy.com

Next, you’ll need to create a database on GoDaddy.com to hold your blog entries and other database content.

  1. Log Into your GoDaddy.com account.
  2. Accessing Your Hosting AccountChoose My Hosting Account from the Hosting & Servers menu on the green navigation bar.
  3. Hosting Account ListIn the Hosting Account list, click the Open link beside the account you want to use for your blog.
  4. In the Hosting Manager window, click the MySQL icon (or link) under Databases.
  5. Click the Create New Database button in the MySQL window.
  6. Creating a MySQL DatabaseIn the MySQL Database Connection Information boxes, enter a user name and a password (twice). The user name will also be the name of your database. Click Continue.
  7. The user name will appear in the next window. Click Create Database to confirm it.
  8. The new database appears in the list of databases with the words Pending Setup beside it. Setup usually takes 5 to 20 minutes.

Get the Server Host Name for the Database

Unlike most WordPress server installations, the host name for a Godaddy.com-hosted WordPress blog is not localhost. So what is it?

The host name can be different for every database. To find out what it is for your database, follow these steps:

  1. Log Into your GoDaddy.com account.
  2. Accessing Your Hosting AccountChoose My Hosting Account from the Hosting & Servers menu on the green navigation bar.
  3. Hosting Account ListIn the Hosting Account list, click the Open link beside the account you want to use for your blog.
  4. In the Hosting Manager window, click the MySQL icon (or link) under Databases.
  5. Click the link for the user name of the database you want to use.
  6. Edit MySQL DatabaseLook at the Host Name field in the My SQL Database Information area of the Edit a MySQL Database window. Write it down — you’ll need it later.

Import the Data into the Database

Now it’s time to import the data from the backup file into the new database you just created. It isn’t hard — once you know where the right buttons are hiding.

  1. Log Into your GoDaddy.com account.
  2. Accessing Your Hosting AccountChoose My Hosting Account from the Hosting & Servers menu on the green navigation bar.
  3. Hosting Account ListIn the Hosting Account list, click the Open link beside the account you want to use for your blog.
  4. In the Hosting Manager window, click the MySQL icon (or link) under Databases.
  5. Click the Open Manager button for the database you want to import into.
  6. Enter the database’s user name and password in the login window and click Log In.
  7. Query ButtonClick the Query Window button on the left side of the phpMyAdmin window that appears.
  8. Import FilesClick the Import Files tab of the query window that appears. Then click the Browse button and use the dialog that appears to locate, select, and open the backup file you created earlier. Its path should appear in the Location box, as shown here. Click Go.
  9. Database TablesphpMyAdmin imports the data. It displays the data tables in the main window, hiding the Import Files query window from view. Close the phpMyAdmin and query windows.

Copying Your Other Data to Your New Blog Site

You’ll need to use FTP software to copy your WordPress blog folder to the proper directory on your GoDaddy hosted account. Where you copy it depends on how you configured GoDaddy, as discussed in the previous article of this series:

  • If you’re just using the domain name the GoDaddy.com account is set up under (either your free hosting account or a paid for account), put the contents of your WordPress folder (not the folder itself) into the root directory of your hosting account.
  • If you’re using a subdomain or other domain name for your blog, put the contents of your WordPress folder (not the folder itself) into the folder you specified when setting up the subdomain or other domain. You may have to use your FTP software to create the necessary folder first.

We explain how to use FTP software in Appendix B of our WordPress book, so I won’t repeat that information here.

Modifying the config.php File

The config.php file, which resides in the root directory of a WordPress installation, must include the correct database name, password, and host. Even if the database name and password are the same as they were on your old installation, the Host probably won’t be.

  1. Use your favorite text editor (not word processor!) to open the config.php file for your blog — preferably the one you’ve already copied to the server. (You can open a local copy, but you must use FTP to put it on the server when you’re done making and saving changes.)
  2. config.phpModify the values in single quotes in each of the define statements in the file. (That’s lines 3 - 6.) This information must match your database setup exactly. The database name and user name will be the same.
  3. Save the file to the server, overwriting any existing file.

Are You Done?

At this point, you’ve done most, if not all, of the work required to make the move. There are just a few things to keep in mind:

  • Test your site by entering its URL in a browser window. If it comes up without error messages, take the rest of the day off — you’re done.
  • If you’re using a DNS server other than GoDaddy’s or you have modified GoDaddy’s DNS server, you’ll have to change the A record to point to the IP address of your site’s Web server. You do this with GoDaddy’s Total DNS Control feature. You can find the server’s IP address by clicking the account name in the Hosting Account list. Your site will not be reachable until you do this — in fact, you might not even be able to access it via FTP to upload the files until this is done.
  • If links to pages or images or other files in your blog entries had fully qualified URLs (for example, http://www.marialanger.com/wp-content/images/picture.jpg) rather than relative URLs (such as /wp-content/images/picture.jpg for content within the blog and you now have a new domain name, you’ll have to manually change all the URLs so they point to the correct domain name. Not fun, I know. You might be able to do a global change using phpMyAdmin, but please don’t ask me how. I don’t know.
  • If you want to start with a fresh installation of WordPress, you can install it into the proper directory on your GoDaddy hosting account. (We explain how to install WordPress in our WordPress book.) Then just copy the wp-content folder from your existing site to the new site.
  • If your old site has a different domain name, it will continue to operate normally until you delete it. I recommending creating an entry in .htaccess to point to the new location. If both versions of your site (original and new) have the same domain name, wait a day or two to delete the old one to give the domain name system a chance to propagate the new IP address of your site. Any new comments on the original site will not be carried forward to the new site.

Previous Article in this Series

Technorati Tags: , , ,

→ 19 Comments • Read 2828 Times
Add to Del.icio.usAdd to Del.icio.us • Technorati ThisTechnorati This • Digg ThisDigg This • Stumble ItStumble it! • Twit ThisTwit This