Book Image

Migrating to Drupal 7

By : Trevor James
Book Image

Migrating to Drupal 7

By: Trevor James

Overview of this book

<p>This book will show you how to migrate your content into the Drupal content management system. You&rsquo;ll start by building a content type in Drupal to hold your migrated content. You&rsquo;ll then import your content into Drupal using the Feeds module. In order to be able to easily use them again and again, you will also learn the best methods of maintaining and packaging migration configurations.<br /><br />In "Migrating to Drupal 7" you&rsquo;ll learn how to quickly package your legacy site&rsquo;s data into a format that&rsquo;s easy to import into Drupal. You&rsquo;ll then build a content type to hold migrated data in Drupal. To save time and hassle you will learn how to import content into Drupal using the Feeds module. You&rsquo;ll then get a brief introduction to the Migrate module and its powerful features.<br /><br />With this guide you&rsquo;ll also learn how to upgrade your Drupal 6 website to Drupal 7 in short, simple steps. You&rsquo;ll also learn how to package your configuration code in Drupal using the powerful Features module.<br /><br />In "Migrating to Drupal 7" you&rsquo;ll start by collecting your current site&rsquo;s content and packaging it up into a CSV file so you can easily import it into Drupal. You&rsquo;ll then build a content type to hold your migrated data and content. <br /><br />Mastering migrations using the Feeds module will be the next invaluable tutorial before you get a closer look at the Migrate module&rsquo;s powerful features. You&rsquo;ll then upgrade your Drupal 6 site to Drupal 7 and use helper modules to help run the upgrade faster and with less hassle. This book will then take you through the process of migrating CCK-based Drupal 6 fields to Drupal 7 using the Content Migrate module. <br /><br />Using the Features module you will then package up our Feeds importer and content types into code to help you to build an easily maintainable and flexible Drupal website with.</p>
Table of Contents (16 chapters)
Migrating to Drupal 7
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
5
Maintaining a Migration Path
8
Migrating Content from Earlier Drupal Versions
Index

Installing the Feeds module


We're going to use the Feeds module to import our content. This module is extremely powerful and allows you to set up automated imports of content from multiple formats including CSV and OPML files; and RSS, XML, and ATOM feeds. The import process we will use in later chapters creates nodes and taxonomy terms in the target website. This is the method we're going to use to migrate our content. We'll be creating a Feeds module based importer that allows us to import data from a CSV file into nodes that are part of a content type in our site. These nodes will hold our individual imported content and act as our new web pages. We'll also import data to taxonomy vocabs on our site so we can use this data as tags.

Feeds support importing from large files that are full of thousands of rows of data and the import process can run in as quickly as two minutes. To get started using the Feeds module we need to install it first. Follow these steps to install:

  1. Download the latest version of Feeds from http://drupal.org/project/feeds/. The latest version is 7.x-2.0-alpha5.

  2. Install it as you would any Drupal contributed module.

  3. Once installed, enable the following modules via your module's admin screen:

    • Feeds

    • Feeds Admin UI

    • Feeds Import

    • Feeds News

    I've included a screenshot of what your module's admin screen in the Feeds fieldset should look like:

  4. Once enabled, click on the Configure link under the Operations column next to your Feeds Admin UI module. That will load the Feeds importers configuration screen from admin/structure/feeds. You can also get to this screen by going to Structure | Feeds importers from your admin menu.

  5. The Feeds importers screen is the launch pad for creating, overriding, exporting or cloning an importer. We'll be doing this starting in Chapter 3, Creating a Feeds Importer.

  6. Feeds loads with some default importers including the following:

    • Node import for importing data and content into nodes on your site

    • User import for importing users into your Drupal's user interface

    • Feed for importing from RSS or Atom feeds

    • OPML import for importing OPML files

  7. The Feed importer is the only importer currently attached to a content type called Feed, on the site. In Chapter 3, Creating a Feeds Importer, we'll start configuring and using these importers and crafting our own content importer, but for now it's good to just view the defaults that the module ships with. You should see the following at this point:

  8. The Feeds module has another configuration screen that we'll be using later to run the actual import process of our content. You can get to this screen by clicking on the Import link that shows in the page description at the top of the Feeds importers screen in the intro text area (see preceding screenshot). Clicking on Import will take you to the following screen at the following path, /import:

The Import screen allows you to click on an import link and load the import administrative page. For example, loading the Node import at this point will load a page that then allows you to upload a CSV file and then click on the Import button to run the import. Again we'll be looking at this process in great detail starting in Chapter 3, Creating a Feeds Importer.

We've installed and enabled the Feeds module and taken a brief look at its default configuration screen. We're now ready to install another Feeds-based module that will hook into the Feeds module, called Feeds Tamper.