5

I am building a Drupal site (first ever) for a company that wants to move off of an outdated custom built CMS.

They have alot of content and we are pretty much keeping the content layout (fields) the same. And of course they want to have there content in the new Drupal site.

The Drupal database structure is pretty complex and I doubt a few simple insert queries will do the trick. I have written Python scripts to do stuff like this is in the past but not with a DB as complex as what Drupal sets up.

What options do I have for importing the old content into Drupal?

5

"Painless" data migration? You're kidding, right? :)

There are numerous answers suggesting the Migrate module. It is certainliy an option, but one I've never liked. I've done dozens of projects with migrations of content from external systems into Drupal (sometimes from multiple external sources simulteneously), including projects with millions of pieces of content, and I'll argue 'til my death that a Batch API implementation in a custom module is the way to go.

No two migrations are the same. Each individual migration will involve 'proprietary' cleanup, data sanitization/changes, etc. The only way to have total control is with an entirely custom script. Don't settle for an easy "80% of the way there" via a generic tool and then struggle for weeks as you bash yourself against that 20% that the tool doesn't handle.

Do it custom, use Entity Metadata Wrappers, and track legacy <--> new content ids in a separate db table.

It may also be an option to simply 'dump' the existing content, markup and all, into a 'legacy' content type and call it a day without moving things into fields and complicating your life. You should sit down with the client and figure out exactly what they want/need, and what they're willing to settle for. Sometimes a simple solution that is just "okay" is a heck of a lot better than the multi-month project that's "awesome."

  • I like the legacy ID as a simple textfield. Using EFQ to find things for re-imports is a little easier this way. – mpdonadio Sep 20 '13 at 22:44
3

You should use Migrate module.

The migrate module provides a flexible framework for migrating content into Drupal from other sources (e.g., when converting a web site from another CMS to Drupal). Out-of-the-box, support for creating core Drupal objects such as nodes, users, files, terms, and comments are included - it can easily be extended for migrating other kinds of content. Content is imported and rolled back using a bundled web interface (Migrate UI module) or included Drush commands

3

Just wanted to add for simple migration cases:

Migrate module is the most flexible, although for simple CMS data you can use the feeds module to import data, XML or CSV etc, after first exporting from the originating CMS via whatever method. see: https://drupal.org/project/feeds tutorials: https://drupal.org/node/622698 and http://developmentseed.org/blog/2009/dec/15/importing-and-aggregating-stuff-feeds/ of course the content types and fields will need to all exist in the new Drupal 7 install.

However, if the CMS data is fairly complex, go with Migrate. https://drupal.org/project/migrate and the https://drupal.org/project/migrate_extras can also be helpful for more flexibility.

1

If you can export your content to an xml,feeds is pretty easy to use.

0

The Migrate Module is what you want. The learning curve is a little steep but it'd handled whatever I could throw at it and I was able to get all my data into Profile2 fields as needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.