Monday 22 July 2013

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



 

BackupBuddy is a plugin that moves a WordPress Web site 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 minutesrather 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://
ewebscapes.com/backupbuddy.

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


2. Install the plugin on your current WordPress Web site.

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 the previous posts.

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

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

11. The BackupBuddy page loads in your Web browser.

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 Web site.

12. Load your Web site in your Web browser.

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

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.

Creating a backup and moving manually



 In,This Chapter , we provide 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. However, when we say content, we mean what you’ve (or someone else has) written or typed into your blog via the WordPress Dashboard, including

✦ Blog posts, pages, and custom post types ✦ Links, categories, and tags

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

✦ WordPress settings you configured under the Settings menu in
the Dashboard

✦ All widgets that you created and configured

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

Other elements of your Web site 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:

✦ 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.

✦ Plugin files: Although all the plugin settings are stored in the database,
the actual, physical 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.

✦ 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.

Moving Your Web Site to a Different Host

There may come a time that you decide you need to switch from your cur-

rent hosting provider to a new one. There are reasons why someone would
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. Transferring from one host to another is a reality
that some Web site owners must face, and transferring an existing Web site,
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:

✦ Manually through backing up your database and downloading

essential files

✦ 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.

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).

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, track-
backs, categories, or users. 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.

Tthe steps to create the file you need to import via RSS. Then follow these steps:

1. On the Import page in the WordPress Dashboard, click the RSS link
and install the plugin to import from an RSS feed.
Click the Activate & Install link and the Import RSS page loads with instructions to import your RSS file, as shown in Figure 7-6.
2. Click the Browse button on the Import RSS page.
A window opens, listing the files on your computer.
3. Double-click the export file you saved earlier from your RSS feed.
4. 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.

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.

Click the Activate Plugin & Install Importer link and the Import

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


2. Click the Browse button.

A window opens, listing the files on your computer.

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

4. 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 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.

Click the Activate Plugin & Install Importer link and the Import Movable Type or TypePad page loads with instructions to import your file, as

2. Click the Browse button.

A window opens, listing your files.

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

4. 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.


When the import script finishes, you can 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 and then 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.


To export your blog content from LiveJournal, log in to your LiveJournal blog

and then type this URL in your browser’s address bar: www.livejournal.
com/export.bml.

LiveJournal lets you export the XML files one month at a time, so if you have
a blog with several months’ worth of posts, be prepared to be at this process
for a while. First, you have to export the entries one month at a time, and then
you have to import them into WordPress — yep, you guessed it — one month
at a time.

To speed the process a little, you can save all the exported XML LiveJournal
files in one text document by copying and pasting each month’s XML file into
one plain-text file (created in a text editor such as Notepad), thereby creating
one long XML file with all the posts from your LiveJournal blog. Then you can
save the file as an XML file to prepare it for import into your WordPress blog.

 


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

Click the Activate Plugin & Install Importer link and the Import LiveJournal
page loads with instructions to import your file, as shown in Figure 7-3.

2. Click the Browse button.


A window opens, listing files on your computer.

3. Double-click the name of the XML file you saved earlier.

4. Click the Upload and Import button.

When the import script finishes, it reloads the page with a confirmation
message that the process is complete. Then WordPress runs the import
script and brings over all your posts from your LiveJournal blog.

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.

Click the Activate Plugin & Install Importer link and the Import Blogger
page loads with instructions to import your file.




2. 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.

3. 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.


4. 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.

5. 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!).

6. 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.

7. 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 user-
name to make the author assignments.

8. Click Save Changes.
You’re done!

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 Tools➪Import.

The Import page appears, listing blogging platforms, such as Blogger
and Movable Type, from which you can import content.


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

Click the Install Now button to install the importer plugin to 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.

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:

✦ 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 tem-
plate conversion yourself.

✦ 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.

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 sev-
eral WordPress consultants to perform the conversion for you — including
yours truly.

Migrating Your Existing Blog to WordPress

Blogging Platform   Backup Information

LiveJournal                Browse to http://livejournal.com/export.

bml and enter your information; choose XML as the format. Save this file on your computer.

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.

 

 

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;

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 in 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.

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:

✦ Archives: Posts, comments, and trackbacks ✦ Template: Template files and image files

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

✦ Images: Any images you use in your blog

A few tips on creating the export data for your blog in a few major blogging platforms. Note: This table assumes that you are logged in to your blog software.