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

Required contributed modules


There are a number of Drupal contributed modules that we'll be using throughout the book, which we should install and configure now. Some of these modules are requirements and dependencies of the Feeds module that we'll be using for our migration processes in the first six chapters. The installation and configuration of each of these modules will be outlined in this section.

The Administration Menu module

The Administration Menu module provides a helpful administration toolbar for the Drupal admin interface. By default core Drupal enables a core module called Toolbar. In this section we'll disable Toolbar, and then install and configure the Administration Menu module:

  1. Go to your core modules admin screen and uncheck the Toolbar module to disable it. Then save your module configuration. This will remove the default black admin toolbar in the header of your site.

  2. Download the latest 7.x stable version of the Administration Menu module from its project page at http://drupal.org/project/admin_menu/. The current version is 7.x-3.0-rc3.

  3. Install this module, as you would do for any Drupal contributed module, to your /sites/all/modules/contrib directory.

  4. Enable the following modules in the Administration fieldset of your module's screen:

    • Administration Development tools

    • Administration menu

    • Administration menu Toolbar style

  5. Refresh your module's page and you should now see the black Administration horizontal drop-down menu appear in your site's header area, as shown in the following screenshot:

Chaos Tool Suite (CTools)

The Chaos Tool Suite (CTools) module is a requirement of the Feeds, Feeds Tamper, and Views modules (all installed later in this chapter); so let's go ahead and install it now to get this requirement out of the way. To install CTools, follow these steps:

  1. CTools can be downloaded from http://drupal.org/project/ctools. The latest version is 7.x-1.2.

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

  3. Once CTools is installed, load your module's admin screen and enable the Chaos Tools core module under the Chaos Tool Suite module fieldset.

  4. The core module is the only one you'll need for now and the default installed configuration is fine. You do not need to make any additional configurations.

Views

We won't be using the Views module extensively in this book or for our migration processes, but Views is an indispensable Drupal module and you'll most likely want to use it to create lists of content on your site. It's also required by the Feeds News module, so let's install it now:

  1. Download the latest version of Views from http://drupal.org/project/views/. The latest version is 7.x-3.5.

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

  3. Once Views is installed, load your module's admin screen and enable the Views and Views UI modules and save your modules' configuration.

  4. To access the Views administration interface once you enable the module, you can go to Structure | Views from your admin menu or go to admin/structure/views.

  5. No additional configuration needs to take place now.

Job Scheduler

The Job Scheduler module is required by the Feeds and Feeds Tamper modules, so let's install it now:

  1. Download the latest version of Job Scheduler from http://drupal.org/project/job_scheduler. This is an alpha version of the module at version 7.x-2.0-alpha3 at the time of this book's writing.

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

  3. Once installed, load your module's admin screen and enable the Job Scheduler and Job Scheduler Trigger modules.

  4. The Job Scheduler module is basically an API that we're loading into our Drupal site that provides many helper functions for Drupal developers. We do not need to actually configure the module. Feeds and Feeds Tamper will both hook into the module on their own.

Features

The Features module is a powerful Drupal module that allows you to package and save your Drupal configurations including content types and Feed importers into code. This means you can build a content type and then save your entire content type's configuration as a module. Then you can take this Features module and install it on another site. Then enable it and you'll have your entire content type on that other Drupal website. This module is extremely helpful if you have a development or staging site and you want to move a content type from the staging site to a production site without having to rebuild the type. You can just install and enable the module.

The Features module is also required by the Feeds News module, as Feeds News hooks into Features to create an example Feature module. So we'll install it for that purpose but we'll also be using the Features module extensively in Chapter 6, Packaging Content Types and Feeds Importers, when we will create features modules for our content type and Feeds importer configurations.

  1. Download the latest version of Features from http://drupal.org/project/features. The latest version of the module is 7.x-1.0.

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

  3. Once installed, load your module's admin screen and enable the Features module.

  4. The configuration screen for Features is located at Structure | Features via the admin menu or by going to admin/structure/features.

  5. We will not be configuring or adding any Features in this chapter but we will be returning to this module in Chapter 6, Packaging Content Types and Feeds Importers.

We've completed installing our required modules. We can now move on to installing and configuring the Feeds and Feeds Tamper modules. These are the modules we'll be using to import our migrated content.