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.
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
- Download Feeds and the dependent modules (CTools & Job Scheduler at the time of writing this post)
- Enable Feeds, Feeds Admin UI, Feeds Import and the dependent modules
- 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
- Navigate to Feeds in the Drupal admin http://yoursite.com/admin/build/feeds/create
- Create a "New Importer" and provide a name & description
- 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
- Fetcher - Choose File Upload
- Parser - Select CSV parser
- Under parser settings, leave the comma as the default field delimiter
- 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
- Have your CSV file ready (see step 3 above)
- Navigate to http://yoursite.com/import and choose the import you just setup
- 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.