I'm working on a new drupal site which I need to migrate from an existing non-drupal site. I need to be able to import the old blog posts as Article nodes (either through some standard import mechanism or I can write some php to programmatically create the nodes).

However, I'm not sure how to handle creating Image and Video data in a node, especially with the need for transcoding video after creation of the node. So, two questions:

1) How can I programmatically create nodes with binary Image and Video data?

2) When I do create a node with Video data, will the post-create transcoding job be started? I'm using Zencoder to do my transcoding.

I am not using the local filesystem for drupal, I'm storing all of my files in Rackspace Cloud Files, however, I can handle it if I need to use the local filesystem temporarily during import and then manually move things over to Cloud Files. This is only a one-time event.

2 Answers 2


Your best bet is to use the Migrate module. It's got a kinda steep learning curve but plenty of documentation available.

The Migrate Extras module provides integration with the Media module, which could help with the video field specifically.

  • You were NOT kidding about a steep learning curve, phew. I haven't gotten to the Video portion yet, but I'm getting the hang of the migrate module and making progress. Commented Nov 21, 2012 at 3:39
  • Awesome, once you get the hang of it its actually pretty sweet! Check out Commerce Kickstart for some nice working examples...
    – Alex Weber
    Commented Nov 26, 2012 at 20:46

Take a look at Datasources.

Datasources provides a framework to describe and manage datasource to import in Drupal.

I've written a generic module to import data into Drupal previously!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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