I'm just getting stuck in to migrating D6 to D7 (please note: migrating, NOT upgrading). I'm using the Drupal-to-Drupal data migration module and its UI to define what I need to bring across.

One of the content types is "Issue": an issue of an online publication which just has a title, some body text (optional) and a file attachment for the PDF version of the publication.

To prepare the migration, I set up a corresponding content type in the D7 database, making sure that the field name was the same in D6 and in D7.

I have run a migration reasonably successfully (except for the major issue of Book structure which doesn't get handled), and all the "Issue" content has come across. However, none of the files in the "File Field" fields have been copied across. I'm trying to get my head round this: do I need to extend the Node Migration class, and if so how do I go about this?

2 Answers 2


Have a look at the Video about Upgrade Drupal6 to Drupal7 using the MIGRATE module. You're probably familiar already with many of the things shown in it, but it also provides some other interesting tips about things like:

  1. Before starting the migration, make sure your current Drupal 6 site is in good shape (like update your contributed modules to the most recent D6 version first).
  2. If you have a lot of files (attachments) to be upgraded also, it might be possible to do that part without using the migrate module.
  3. If you have a possibility to create a (temporary) subdomain for your Drupal 7 version, that will speed up the migration execution quite a lot.

Especially bullet nr '2.' above may be worth experimenting with. In the video it is shown starting from about 12:05 (and the "Step 4: Files" screen provides some more details about what your options are here). Later on in the video, starting from about 15:45, you can see that the "image placeholders" (pointing to some files) are already OK. So afterwards you just need to copy those files to the right spot, using FTP or something.

So try running migrate with that option for Step 4 "unchecked" (turned off)!


When you map content types using the UI, complex field mappings like file fields and term references are not automatically set up - you need to do this manually by editing the migration containing the fields.

  1. In the migration dashboard, click your node migration name.
  2. Click the Edit tab at the top.
  3. Make sure you have your source and destination file fields mapped to each other.
  4. For the file field mapping, in the "source migration" column at the right, select the migration for the actual files.
  5. Below that there should be a destination field like "field_file:file_class".
  6. Fill in the "default value" column with the string MigrateFileFid.

See the documentation (https://www.drupal.org/node/1819704) and feature request to have this happen automatically (https://www.drupal.org/node/2154015).

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.