Chapter 7: Backing Up, Packing Up, and Moving to a New Host

In This Chapter

arrow.png Moving to WordPress from a different platform

arrow.png Handling the database backup management

arrow.png Backing up plugins and themes

arrow.png Storing images and media files

arrow.png Exporting data from WordPress

arrow.png Using plugins to make backups and moving easier

As a WordPress website owner, you may need to move your site to a different home on the web; either to a new web host or into a different account on your current hosting account. Or maybe you’re an owner who needs to move your site right now.

This chapter covers the best way to migrate a blog that exists within a different blogging platform (such as Movable Type or TypePad) to WordPress. This chapter also takes you through how to back up your WordPress files, data, and content and move them to a new hosting provider or a different domain.

Migrating Your Existing Blog to WordPress

So you have a blog on a different blogging system and want to move your blog to WordPress? This chapter helps you accomplish just that. WordPress makes it relatively easy to pack up your data and archives from one blog platform and move to a new WordPress blog.

WordPress lets you move your blog from such platforms as Blogspot (also called Blogger), TypePad, and Movable Type. It also gives you a nifty way to migrate from any blogging platform via RSS feeds, as long as the platform you’re importing from has an RSS feed available. Some platforms, such as Myspace, have some limitations on RSS feed availability, so be sure to check with your platform provider. In this chapter, you discover how to prepare your blog for migration and how to move from the specific platforms for which WordPress provides importer plugins.

technicalstuff.eps For each blogging platform, the WordPress.org platform provides you with a quick and easy way to install plugins that allows you to import and use your content right away. The importers are packaged in a plugin format because most people use an importer just once, and some people don’t use the importer tools at all. The plugins are there for you to use if you need them. WordPress.com, on the other hand, has the importers built into the software. Note the differences for the version you are using.

Movin’ on up

Bloggers have a variety of reasons to migrate from one system to WordPress:

check Curiosity: There is a lot of buzz around the use of WordPress and the whole community of WordPress users. People are naturally curious to check out something that all the cool kids are doing.

check More control of your blog: This reason applies particularly to those who have a blog on Blogspot, TypePad, or any other hosted service. Hosted programs limit what you can do, create, and mess with. When it comes to plugins, add-ons, and theme creation, hosting a WordPress blog on your own web server wins hands down. Additionally, you have complete control of your data, archives, and backup capability when you host your blog on your own server.

check Ease of use: Many people find the WordPress interface easier to use, more understandable, and a great deal more user-friendly than many of the other blogging platforms available today.

The hosted version of WordPress.com and the self-hosted version of WordPress.org allow you to migrate your blog to their platforms; however, WordPress.com does not provide as many options for import as WordPress.org does. The following is a list of blogging platforms that have built-in importers, or import plugins, for migration to WordPress:

check Blogger

check LiveJournal

check Movable Type

check TypePad

check RSS Feeds

check Tumblr

check WordPress.com

remember.eps In the WordPress.org software (self-hosted), the importers are added to the installation as plugins. The importer plugins included in the preceding list are plugins packaged within the WordPress.org software or found by searching in the Plugin Directory at http://wordpress.org/extend/plugins/tags/importer. You can import content from several other platforms by installing other plugins from the WordPress Plugin Directory, but you may have to search a bit on Google to find them.

Preparing for the big move

Depending on the size of your blog (that is, how many posts and comments you have), the migration process can take anywhere from 5 to 30 minutes. As with any major change or update you make, no matter where your blog is hosted, the very first thing you need to do is create a backup of your blog. You should back up the following:

check Archives: Posts, comments, and trackbacks

check Template: Template files and image files

check Links: Any links, banners, badges, and elements you have in your current blog

check Images: Any images you use in your blog

Table 7-1 gives you a few tips on creating the export data for your blog in a few major blogging platforms. Note: You need to be logged in to your blog software.

Table 7-1 Backing Up Your Blog Data on Major Platforms

Blogging Platform

Backup Information

Movable Type

Click the Import/Export button in the menu of your Movable Type Dashboard and then click the Export Entries From link. When the page stops loading, save it on your computer as a .txt file.

TypePad

Click the name of the blog you want to export and then click the Import/Export link on the Overview menu. Click the Export link at the bottom of the Import/Export page. When the page stops loading, save it on your computer as a .txt file.

Blogspot

Back up your template by copying the text of your template to a text editor, such as Notepad. Save it on your computer as a .txt file.

LiveJournal

Browse to http://livejournal.com/export.bml and enter your information; choose XML as the format. Save this file on your computer.

Tumblr

Browse to http://www.tumblr.com/oauth/apps and follow the directions there to create a Tumblr app. When done, copy the OAuth Consumer Key and Secret Key and paste them in a text file on your computer. Use these keys to connect your WordPress blog to your Tumblr account.

WordPress

Choose Tools⇒Export on the Dashboard; choose your options on the Export page and then click the Download Export File button. Save this file on your computer.

RSS feed

Point your browser to the URL of the RSS feed you want to import. Wait until it loads fully. (You may need to set your feed to display all posts.) View the source code of the page, copy and paste that source code into a .txt file, and save the file on your computer.

tip.eps This import script allows for a maximum file size of 128MB. If you get an "out of memory" error, try dividing the import file into pieces and uploading them separately. The import script is smart enough to ignore duplicate entries, so if you need to run the script a few times to get it to take everything, you can do so without worrying about duplicating your content. (You could also attempt to, temporarily, increase your PHP memory limit by making a quick edit of the wp-config.php file; more information on this is found in Book II, Chapters 3 and 4.)

Converting templates

Every blogging program has a unique way of delivering content and data to your blog. Template tags vary from program to program; no two are the same, and each template file requires conversion if you want to use your template with your new WordPress blog. In such a case, you have two options:

check Convert the template yourself. To accomplish this task, you need to know WordPress template tags and HTML. If you have a template that you’re using on another blogging platform and want to convert it for use with WordPress, you need to swap the original platform tags for WordPress tags. The information provided in Book VI gives you the rundown on working with themes, as well as basic WordPress template tags; you may find that information useful if you plan to attempt a template conversion yourself.

check Hire an experienced WordPress consultant to do the conversion for you. See Book I, Chapter 4 for a list of WordPress consultants.

To use your own template, make sure that you saved all the template files, the images, and the stylesheet from your previous blog setup. You need them to convert the template(s) for use in WordPress.

remember.eps Hundreds of free templates are available for use with WordPress, so it may be a lot easier to abandon the template you’re currently working with and find a free WordPress template that you like. If you paid to have a custom design done for your blog, contact the designer of your theme and hire him to perform the template conversion for you. Alternatively, you can hire several WordPress consultants to perform the conversion for you — including yours truly.

Moving your blog to WordPress

You’ve packed all your stuff, and you have your new place prepared. Moving day has arrived!

This section takes you through the steps for moving your blog from one blog platform to WordPress. This section assumes that you already have the WordPress software installed and configured on your own domain.

Find the import function that you need by following these steps:

1. On the Dashboard, choose ToolsImport.

The Import page appears, listing blogging platforms such as Blogger and Movable Type, from which you can import content. (See Figure 7-1.)

2. Click the link for the blogging platform you’re working with.

3. Click the Install Now button to install the importer plugin and begin using it.

The following sections provide some import directions for a few of the most popular blogging platforms (other than WordPress, that is). Each platform has its own content export methods, so be sure to check the documentation for the blogging platform that you are using.

9781118383339-fg020701.tif

Figure 7-1: The Import feature of the (self-hosted) WordPress.org Dashboard.

Importing from Blogspot, er, Blogger

I call it Blogspot; you call it Blogger — a rose by any other name would smell as sweet. The blogging application owned by Google is referenced either way. In the end, we’re talking about the same application.

To begin the import process, first complete the steps in the “Moving your blog to WordPress” section, earlier in this chapter. Then follow these steps:

1. Click the Blogger link on the Import page and install the plugin for importing from Blogger.

2. Click the Activate Plugin & Install Importer link.

The Import Blogger page loads with instructions to import your file, as shown in Figure 7-2.

3. Click the Authorize button to tell WordPress to access your account.

A page from Google opens with a message that says your WordPress blog is trying to access your Google account.

4. Enter the e-mail address and password you use for Google; then click the Sign In button.

The Access Request page in your Google Account opens. When you have successfully logged in, you receive a message from Google stating that your blog at WordPress is requesting access to your Blogger account so that it can post entries on your behalf.

9781118383339-fg020702.tif

Figure 7-2: Import Blogger page on the WordPress Dashboard.

5. Give your permission by clicking the Grant Access button on the Access Request page.

If you have many posts and comments in your Blogger blog, the import can take 30 minutes or more.

After the import script has performed its magic, you’re redirected to your WordPress Dashboard, where the name of your Blogger blog is listed.

6. To finish importing the data from Blogger, click the Import button (below the Magic Button header).

The text on the button changes to Importing . . . while the import takes place. When the import is complete, the text on the button changes to Set Authors (no wonder it’s called the Magic Button!).

7. Click the Set Authors button to assign the authors to the posts.

The Blogger username appears on the left side of the page; a drop-down menu on the right side of the page displays the WordPress login name.

8. Assign authors by using the drop-down menu.

If you have just one author on each blog, the process is especially easy: Use the drop-down menu on the right to assign the WordPress login to your Blogger username. If you have multiple authors on both blogs, each Blogger username is listed on the left side with a drop-down menu to the right of each username. Select a WordPress login for each Blogger username to make the author assignments.

9. Click Save Changes.

You’re done!

Importing from LiveJournal

Both WordPress.com and WordPress.org offer an import script for LiveJournal users, and the process of importing from LiveJournal to WordPress is the same for each platform.

From the Import page on your WordPress Dashboard, follow these steps:

1. Click the LiveJournal link and install the plugin for installing from LiveJournal.

2. Click the Activate Plugin & Install Importer link.

The Import LiveJournal page loads with instructions to import your file, as shown in Figure 7-3.

3. In the LiveJournal Username field, type the username for your LiveJournal account.

4. In the LiveJournal Password field, type the password for your LiveJournal account.

9781118383339-fg020703.tif

Figure 7-3: Import LiveJournal page on the WordPress Dashboard.

5. In the Protected Post Password field, enter the password you want to use for all protected entries in your LiveJournal account.

tip.eps If you don’t complete this step, every entry you import into WordPress will be viewable by anyone. Be sure to complete this step if any of your entries in your LiveJournal account are password protected (or private).

6. Click the Connect to LiveJournal and Import button.

This connects your WordPress site to your LiveJournal account and automatically imports all entries from your LiveJournal into your WordPress installation. If your LiveJournal site has a lot of entries, this could take a long time — so be patient.

Importing from Movable Type and TypePad

Six Apart created both Movable Type and TypePad. These two blogging platforms run on essentially the same code base, so the import/export procedure is the same for both. Refer to Table 7-1, earlier in this chapter, for details on how to run the export process in both Movable Type and TypePad. This import script moves all your blog posts, comments, and trackbacks to your WordPress blog.

Go to the Import page on your WordPress Dashboard by following Steps 1 and 2 in the “Moving your blog to WordPress” section, earlier in this chapter. Then follow these steps:

1. Click the Movable Type and TypePad link and install the plugin for importing from Movable Type and TypePad.

2. Click the Activate Plugin & Install Importer link.

The Import Movable Type or TypePad page loads with instructions to import your file, as shown in Figure 7-4.

3. Click the Browse button.

A window opens, listing your files.

4. Double-click the name of the export file you saved from your Movable Type or TypePad blog.

5. Click the Upload File and Import button.

Sit back and let the import script do its magic. When the script finishes, it reloads the page with a confirmation message that the process is complete.

6. When the import script finishes, assign users to the posts, matching the Movable Type or TypePad usernames with WordPress usernames.

If you have just one author on each blog, this process is easy; you simply assign your WordPress login to the Movable Type or TypePad username by using the drop-down menu. If you have multiple authors on both blogs, match the Movable Type or TypePad usernames with the correct WordPress login names.

7. Click Save Changes.

9781118383339-fg020704.tif

Figure 7-4: Import Movable Type or TypePad page on the WordPress Dashboard.

Importing from Tumblr

With the Tumblr import script for WordPress, it’s easy to import the content from your Tumblr account to your WordPress blog. To complete the import, follow these steps:

1. Go to www.tumblr.com/oauth/apps.

The Tumblr login page appears.

2. Enter your e-mail and password to log in to your Tumblr account.

The Register Your Application page appears.

3. Complete the Register Your Application form by filling in the following fields:

Application Name: Type the name of your WordPress website in the text box.

Application Website: Type the URL of your WordPress website in the text box.

Default Callback URL: Type the URL of your WordPress website in the text box.

Seven text fields are in this form, but you only have to fill in these fields; you can leave the rest blank.

4. Click the Register button.

The Applications page refreshes and displays your registered app information at the top.

5. Copy the OAuth Consumer Key and paste it into a text file on your computer.

6. Copy the Secret Key and paste it into the same text file you placed the OAuth Consumer Key in Step 5.

7. From your Dashboard, choose ToolsImport and click the Tumblr link.

The Import Tumblr page on your Dashboard opens.

8. Insert the OAuth Consumer Key in the indicated text box.

Use the OAuth Consumer Key you saved to a text file in Step 5.

9. Insert the Secret Key in the indicated text box.

Use the Secret Key you saved to a text file in Step 6.

10. Click the Connect to Tumblr button.

The Import Tumblr page appears with a message instructing you to authorize Tumblr.

11. Click the Authorize the Application link.

The Authorization page on the Tumblr website asks you to authorize your WordPress site access to your Tumblr account.

12. Click the Allow button.

The Import Tumblr page opens in your WordPress Dashboard and displays a list of your sites from Tumblr.

13. Click the Import This Blog button in the Action/Status section.

The content from your Tumblr account is imported into WordPress. Depending on how much content you have on your Tumblr site, this may take several minutes to complete. The Import Tumblr page then refreshes with a message telling you that the import is complete.

Importing from WordPress

With the WordPress import script, you can import one WordPress blog into another; this is true for both the hosted and self-hosted versions of WordPress. WordPress imports all your posts, comments, custom fields, and categories into your blog. Refer to Table 7-1, earlier in this chapter, to find out how to use the export feature to obtain your blog data.

When you complete the export, follow these steps:

1. Click the WordPress link on the Import page and install the plugin to import from WordPress.

2. Click the Activate Plugin & Install Importer link.

The Import WordPress page loads with instructions to import your file, as shown in Figure 7-5.

3. Click the Browse button.

A window opens, listing the files on your computer.

4. Double-click the export file you saved earlier from your WordPress blog.

9781118383339-fg020705.tif

Figure 7-5: Import WordPress page on the WordPress Dashboard.

5. Click the Upload File and Import button.

The import script gets to work, and when it finishes, it reloads the page with a confirmation message that the process is complete.

Importing from an RSS feed

If all else fails, or if WordPress doesn’t provide an import script that you need for your current blog platform, you can import your blog data via the RSS feed for the blog you want to import. With the RSS import method, you can import posts only; you can’t use this method to import comments, trackbacks, categories, or users.

remember.eps WordPress.com currently doesn’t let you import blog data via an RSS feed; this function works only with the self-hosted WordPress.org platform.

Refer to Table 7-1, earlier in this chapter, for the steps to create the file you need to import via RSS. Then follow these steps:

1. On the Import page of the WordPress Dashboard, click the RSS link and install the plugin to import from an RSS feed.

2. Click the Activate & Install link.

The Import RSS page loads with instructions to import your RSS file, as shown in Figure 7-6.

3. Click the Browse button on the Import RSS page.

A window opens, listing the files on your computer.

9781118383339-fg020706.tif

Figure 7-6: The Import RSS page of the WordPress Dashboard.

4. Double-click the export file you saved earlier from your RSS feed.

5. Click the Upload File and Import button.

The import script does its magic and then reloads the page with a confirmation message that the process is complete.

Finding other import resources

The WordPress Codex has a long list of other available scripts, plugins, workarounds, and outright hacks for importing from other blog platforms. You can find that information at http://codex.wordpress.org/Importing_Content.

Note, however, that volunteers run the WordPress Codex. When you refer to the Codex, be aware that not everything listed in it is necessarily up-to-date or accurate, including import information (or any other information about running your WordPress blog).

Moving Your Website to a Different Host

There may come a time that you decide you need to switch from your current hosting provider to a new one. There are reasons why you’d have to do this — either you’re unhappy with your current provider and want to move to a new one, or your current provider is going out of business and you’re forced to move. And transferring an existing website, with all of its content, files, and data, from one host to another can seem a very daunting task. This section of the chapter should make it easier for you.

You can go about it two ways:

check Manually through backing up your database and downloading essential files

check Using a plugin to automate as much of the process as possible

Obviously, using a tool to automate the process for you to make it easier is the more desirable way to go, but just in case you need to do it manually, in the next section of this chapter, I provide you with the instructions for doing it both ways.

Creating a backup and moving manually

Book II, Chapter 6 provides you with step-by-step instructions on how to take a backup of your database by using phpMyAdmin. Follow the steps available in that chapter and you’ll have a backup of your database with all the recent content you’ve published to your blog — content being what you’ve (or someone else has) written or typed into your blog via the WordPress Dashboard, including

check Blog posts, pages, and custom post types

check Links, categories, and tags

check Post and page options, such as excerpts, time and date, custom fields, post categories, post tags, and passwords

check WordPress settings you configured under the Settings menu on the Dashboard

check All widgets that you created and configured

check All plugin options that you configured for the plugins you installed

Other elements of your website aren’t stored in the database, which you need to download, via FTP, from your web server. The following is a list of those elements, including instructions on where to find them and how to download them to your local computer:

check Media files: The files you uploaded by using the WordPress media upload feature, including images, videos, audio files and documents. Media files are located in the /wp-content/uploads folder. Connect to your web server via FTP and download that folder to your local computer.

check Plugin files: Although all the plugin settings are stored in the database, the actual plugin files are not. The plugin files are located in the /wp-content/plugins folder. Connect to your web server via FTP and download that folder to your local computer.

check Theme files: Widgets and options you've set for your current theme are stored in the database; however, the physical theme template files, images, and stylesheets are not. They're stored in the /wp-content/themes folder. Connect to your web server via FTP and download that folder to your local computer.

Now you have your database and WordPress files stored safely on your local computer; moving them to a new host just involves reversing the process:

1. Create a new database on your new hosting account.

The steps for creating a database are found in Book II, Chapter 4.

2. Import your database backup into the new database you just created:

a. Log in to the cPanel for your hosting account.

b. Click the phpMyAdmin icon and click the name of your new database in the left menu.

c. Click the Import tab at the top.

d. Click the Browse button and select the database backup from your local computer.

e. Click the Go button; the old database imports into the new.

3. Install WordPress on your new hosting account.

The steps for installing WordPress are found in Book II, Chapter 4.

4. Edit the wp-config.php file to include your new database name, username, password, and host.

Information on editing the information in the wp-config.php file is found in Book II, Chapter 3 and Chapter 4.

5. Upload all that you downloaded from the /wp-content folder to your new hosting account.

6. Browse to your domain in your web browser.

Your website should work, and you can log in to the WordPress Dashboard by using the same username and password as before because that information is stored in the database you imported.

Using a plugin to back up and move to a new host

BackupBuddy is a plugin that moves a WordPress website from one hosting environment to another. This plugin is not free or available in the WordPress Plugin Directory, but it’s worth every penny because it takes the entire backup and migration process and makes mincemeat out of it — meaning, it makes moving the site easy to accomplish and can be done in minutes rather than hours. Follow these steps to use this plugin to move your site to a new hosting server:

1. Purchase and download the BackupBuddy plugin from http://ithemes.com/purchase/backupbuddy/.

At this time, the cost for the plugin starts at $45.

2. Install the plugin on your current WordPress website.

By current, I mean the old one, not the new hosting account yet.

3. Activate the plugin on your WordPress Dashboard.

Choose Plugins in the navigation menu and then click the Activate link under the BackupBuddy plugin name.

4. Navigate to the Backups section on the BackupBuddy options page.

Click the Backups link in the BackupBuddy menu.

5. Click the Full Backup button.

This initiates a full backup of your database, files, and content and wraps it neatly into one .zip file for you to store on your local computer.

6. Download the importbuddy.php file.

Click the importbuddy.php file on the Backups page and download it to your local computer, preferably in the same directory as the backup file you downloaded in Step 5.

7. Connect to your new web server via FTP.

8. Upload the backup.zip file and the importbuddy.php file.

These files should be uploaded in the root, or top level, directory on your web server. (On some web servers, this is the /public_html folder; on others it might be the /httpdocs folder. If you're unsure what your root directory is, your hosting provider should be able to tell you.)

9. Create a new database on your new hosting account.

The steps for creating a database are found in Book II, Chapter 4.

10. Navigate to the importbuddy.php file in your web browser.

The URL for this looks similar to http://yourdomain.com/importbuddy.php.

The BackupBuddy page loads in your web browser.

11. Follow the steps to import the backup file and install WordPress, including the database information needed: database username, name, password, and host.

This entire process takes about five to ten minutes, maybe more depending on the size of your website.

12. Load your website in your web browser.

After BackupBuddy does its thing, your website is ready to use like always.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.165.234