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:
Download the latest version of Feeds from http://drupal.org/project/feeds/. The latest version is 7.x-2.0-alpha5.
Install it as you would any Drupal contributed module.
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:
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.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.
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
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:
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.