Chapter 7

Backing Up, Packing Up, and Moving to a New Host

IN THIS CHAPTER

Check Moving to WordPress from a different platform

Check Handling the database backup management

Check Backing up plugins and themes

Check Storing images and media files

Check Exporting data from WordPress

Check 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 to 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 site that exists within a different 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 then move them to a new hosting provider or a different domain.

Migrating Your Existing Site to WordPress

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

By default, WordPress lets you move your site from such platforms as Blogger, TypePad, and Movable Type. It also gives you a nifty way to migrate from any platform via RSS feeds, as long as the platform you’re importing from has an RSS feed available. Some platforms, such as Medium (https://medium.com), 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 site for migration and how to move from the specific platforms for which WordPress provides importer plugins.

Movin’ on up

Technical stuff For each platform, the WordPress.org platform provides a quick and easy way to install plugins so that you can 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’re using.

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

  • Simple curiosity: WordPress currently powers more than 32% of all websites on the Internet today, people are naturally curious to check out software that is popular for generating content.
  • More control of your website: This reason applies particularly to those who have a site on Blogger, 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 site on your own web server wins hands down. In addition, you have complete control of your data, archives, and backup capability when you host your site on your own server.
  • 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 publishing platforms available today.

Remember In the WordPress software, the importers are added to the installation as plugins. The importer plugins included in this chapter are the plugins packaged within the WordPress software; you can also find them by searching the Plugins page at https://wordpress.org/plugins/tags/importer. You can import content from several other platforms by installing other plugins that aren’t available from the official WordPress Plugin page, but you may have to do an Internet search to find them.

Preparing for the big move

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

  • Archives: Posts, comments, and trackbacks
  • Template: Template and image files
  • Plugins: Plugin files (do this by transferring the /wp-content/plugins folder from your hosting server to your local computer via SFTP)
  • Links: Any links, banners, badges, and elements you have on your current site
  • Media: Any media files (images, video, audio, or documents) you use on your site

Table 7-1 gives you a few tips on creating the export data for your site in a few major publishing platforms. Note: This table assumes that you're logged in to your site software.

TABLE 7-1 Backing Up Your Website Data on Major Platforms

Publishing Platform

Backup Information

Movable Type

Click the Import/Export button on 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 site 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.

Blogger

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 https://livejournal.com/export.bml, and enter your information; choose XML as the format. Save this file on your computer.

Tumblr

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

WordPress

Choose Tools⇒  Export in 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 The WordPress 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; for more information on this technique, see Book 2, Chapters 3 and 4.)

Converting templates

Every program has a unique way of delivering content and data to your site. Template tags vary from program to program; no two tags are the same. Also, each template file requires conversion if you want to use your template with your new WordPress site. 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 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 6 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.
  • Hire an experienced WordPress consultant to do the conversion for you. See Book 1, Chapter 4 for a list of WordPress consultants.

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

Remember Thousands of free themes 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 site, contact the designer of your theme, and hire him or her 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 site 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 site from one 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. In the Dashboard, choose Tools⇒  Import.

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

  2. Find the publishing platform you’re working with.
  3. Click the Install Now link to install the importer plugin and begin using it.
“Screenshot of the WordPress Dashboard displaying the Import page, listing blogging platforms such as Blogger and Movable Type to import content.”

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

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

Importing from Blogger

Blogger is the blogging application owned by Google.

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

  1. Click the Install Now link below the Blogger heading on the Import page, and install the plugin for importing from Blogger.
  2. Click the Run Importer link.

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

  3. Log in to your Blogger account.
  4. In your Blogger account, click the blog you’d like to import.
  5. In your Blogger account, choose Settings⇒  Other.

    This link is on the left menu.

  6. In your Blogger account, choose Back Up Content⇒  Save to Your Computer.

    Save the .xml file to your computer.

  7. In your WordPress Dashboard, on the Import Blogger page, click the Choose File button to upload the Blogger XML file.
  8. Click the Upload and Import button.

    This step uploads the file. The screen refreshes to the Import Blogger → Assign Authors screen.

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

  10. Assign authors by choosing them from the drop-down menu.

    If you have only 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. Choose a WordPress login for each Blogger username to make the author assignments.

  11. Click Save Changes.

    You’re done!

Screenshot displaying the Import Blogger page in the WordPress Dashboard, with instructions for importing a file on to a blogger account.

FIGURE 7-2: The Import Blogger page in the WordPress Dashboard.

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 site content from LiveJournal, log in to your LiveJournal site and then type https://www.livejournal.com/export.bml in your browser’s address bar.

LiveJournal lets you export the XML files by month, so if you have a site 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; then you have to import them into WordPress — yep, you guessed it — one month at a time.

Tip 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, for PC, or TextEdit on a Mac), 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 site.

After you export the XML file from LiveJournal, return to the Import page of your WordPress Dashboard, and follow these steps:

  1. Click the Install Now link below the LiveJournal heading, and install the plugin for installing from LiveJournal.
  2. Click the Run Importer link.

    The Import LiveJournal page loads, with instructions for importing 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.
  5. In the Protected Post Password field, enter the password you want to use for all protected entries in your LiveJournal account.

    Warning 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 is password-protected (or private).

  6. Click the Connect to LiveJournal and Import button.

    This step 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 process could take a long time, so be patient.

Screenshot displaying the Import LiveJournal page in the WordPress Dashboard with instructions for importing a file.

FIGURE 7-3: The Import LiveJournal page in the WordPress Dashboard.

Importing from Movable Type and TypePad

Six Apart created both Movable Type and TypePad. These two 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 site posts, comments, and trackbacks to your WordPress website.

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

  1. Click the Install Now link below the Movable Type and TypePad heading, and install the plugin for importing from Movable Type and TypePad.
  2. Click the Run Importer link.

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

  3. Click the Choose File 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 message confirming 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 only 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.
Screenshot displaying the  Import Movable Type or TypePad page on the WordPress Dashboard with instructions for importing a file.

FIGURE 7-4: The 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 https://www.tumblr.com/oauth/apps.

    The Tumblr login page appears.

  2. Enter your email address 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 have to fill in these only these three fields; you can leave the rest blank.

  4. Click the Register button.

    Make sure to select the check box that says I'm not a robot to prove that you’re human and not a spammer.

    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 where you placed the OAuth Consumer Key in step 5.
  7. In your Dashboard, choose Tools⇒  Import and then click the Tumblr link.

    The Import Tumblr page of your Dashboard opens.

  8. Insert the OAuth Consumer Key into 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 of your Tumblr account is imported into WordPress. Depending on how much content you have on your Tumblr site, this process may take several minutes to complete. Then the Import Tumblr page refreshes with a message telling you that the import is complete.

Importing from WordPress

With the WordPress import script, you can import one WordPress site 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 site. Refer to Table 7-1, earlier in this chapter, to find out how to use the export feature to obtain your site data.

When you complete the export, follow these steps:

  1. Click the Install Now link below the WordPress title on the Import page, and install the plugin to import from WordPress.
  2. Click the Run Importer link.

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

  3. Click the Choose File button.

    A window opens, listing the files on your computer.

  4. Double-click the export file you saved earlier from your WordPress blog.
  5. Click the Upload File and Import button.

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

Screenshot displaying the Import WordPress page in the WordPress Dashboard with instructions for importing a file.

FIGURE 7-5: The Import WordPress page in the WordPress Dashboard.

Importing from an RSS feed

If all else fails, or if WordPress doesn’t provide an import script that you need for your current site platform, you can import your site data via the RSS feed for the site 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 WordPress.com currently doesn’t let you import site 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 Install Now link below the RSS heading, and install the plugin to import from an RSS feed.
  2. Click the Run Importer link.

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

  3. Click the Choose File button on the Import RSS page.

    A window opens, listing the files on your computer.

  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 message confirming that the process is complete.

Screenshot displaying the Import RSS page of the WordPress Dashboard with instructions for importing an RSS file.

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

Finding other import resources

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

Remember Note, however, that volunteers run the WordPress Codex. When you refer to it, 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 site).

Moving Your Website to a Different Host

There may come a time that you decide that you need to switch from your current hosting provider to a new one. There are numerous reasons why you’d have to do this. Perhaps 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. Yet transferring an existing website — with all its content, files, and data — from one host to another can seem to be a very daunting task. This section of the chapter should make it easier for you.

You can go about it two ways:

  • Backing up your database and downloading essential files manually
  • Using a plugin to automate as much of the process as possible

Obviously, using a tool to automate the process for you 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 the instructions for both methods.

Creating a backup and moving manually

Book 2, Chapter 6 provides step-by-step instructions for making a backup of your database by using phpMyAdmin. Follow the steps in that chapter, and you’ll have a backup of your database with all the recent content you’ve published to your site — content being what you (or someone else) wrote or typed on your site via the WordPress Dashboard, including

  • Blog posts, pages, and custom post types
  • Categories and tags
  • Post and page options, such as excerpts, time and date, custom fields, post categories, post tags, and passwords
  • WordPress settings you configured on the Settings menu of the Dashboard
  • All widgets that you created and configured
  • All plugin options that you configured for the plugins you installed

Other elements of your website aren’t stored in the database, so you need to download those elements, via SFTP, from your web server. Following is a list of those elements, with instructions on where to find them and how to download them to your computer:

  • Media files: Media files are 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 SFTP, and download that folder to your computer.
  • Plugin files: Although all the plugin settings are stored in the database, the plugin files are not. The plugin files are located in the /wp-content/plugins folder. Connect to your web server via SFTP, and download that folder to your computer.
  • Theme files: Widgets and options you've set for your current theme are stored in the database, but 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 SFTP, and download that folder to your computer.

Moving the database and files to the new host

When you have your database and WordPress files stored safely on your computer, moving them to a new host just involves reversing the process. Follow these steps:

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

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

  2. Import your database backup into the new database you just created:
    1. Log in to the cPanel for your hosting account.
    2. Click the phpMyAdmin icon, and click the name of your new database on the left menu.
    3. Click the Import tab at the top.
    4. Click the Browse button and select the database backup from your computer.
    5. Click the Go button. The old database imports into the new.
  3. Install WordPress in your new hosting account.

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

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

    Information on editing the information in the wp-config.php file is in Book 2, chapters 3 and 4.

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

    Be sure that you upload these files into the /wp-content folder in 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.

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

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