Drupal Imports using Feeds Module

Sometimes it can be a huge time saver to import large sets of data into Drupal, rather than entering content one-by-one through the admin interface.


Say that your client has a spreadsheet of a couple hundred people that includes a first name, last name, weight, height, gender, etc. It would take way too long to enter those one at a time.

There are actually quite a few ways to import content into Drupal, and we've written about the Migrate module before. Since I'm not a full-time developer, I typically seek out less technical solutions.

Node Import, and Feeds are two solutions I've used recently to import content. From my experience Feeds has been a bit more flexible, so I'll focus this tutorial on that module.

I'll highlight the steps it takes to import content with Feeds, and if you are more visual learner, you can check out the screencast at the end of this post.

Setting up Feeds on a Drupal 6 Site

  1. Download Feeds and the dependent modules (CTools & Job Scheduler at the time of writing this post)
  2. Enable Feeds, Feeds Admin UI, Feeds Import and the dependent modules
  3. Create a CSV File - Organize and format the content you would like to import and save it as a CSV file. (Note: Feeds can also import RSS/Atom/RDF based content...hence it's name, but I'm going to focus on it's ability to import CSV files)
    • The first row should contain column headers that accurately describe the content
    • Each subsquent row in the spreadsheet will equal one imported node in Drupal
  4. Navigate to Feeds in the Drupal admin http://yoursite.com/admin/build/feeds/create
  5. Create a "New Importer" and provide a name & description
  6. Basic Settings
    • Name & Description - Update if needed
    • Attach to Content Type - Leave as default, "Use standalone form"
    • Minimum Refresh Period - None
    • Import on Submission - Leave Checked
  7. Fetcher - Choose File Upload
  8. Parser - Select CSV parser
    • Under parser settings, leave the comma as the default field delimiter
  9. Processor - leave the default as Node processor
    • Settings - Set content type you are importing content for
    • Mapping - Match your CSV column headers to fields in your content type. Each column header that you wish to import should be added to this page.

Your First Import

  1. Have your CSV file ready (see step 3 above)
  2. Navigate to http://yoursite.com/import and choose the import you just setup
  3. Click Import

If all went well, your new content should now exist as nodes in Drupal. Navigate to the edit screen http://yoursite.com/admin/content/node and check out some of your newly imported content.

See the Screencasts

Drupal - Import CSV Data Using Feeds - Part 1

Drupal - Import CSV Data Using Feeds - Part 2

Code Drupal Planet

Read This Next