Migrate Magento Stores into Drupal Commerce

Commerce Migrate Magento is a migration using Commerce Migrate and the Migrate suite that can migrate Magento stores from either the existing Drupal database or an external database on the same machine.

Visit admin admin/content/migrate/magento_migration_options to configure import options, including the source database, product variation, product display, tax and billing settings.

Please read the README.txt and all the details on this page. There are specific requirements for setup before a migration.

What currently works:

  • Each product type gets its own migration. Duplicate SKUs will get _2 and _3 (automatic de-duping). Settings will dictate the extraction of products based in product categories.
  • Each product type gets its own node migration, which creates the matching product_display nodes. NIDs are preserved by default (duplication errors if you re-used nid 5 for example). Settings will dictate the extraction of products based in product categories.
  • Customer billing and shipping profiles are created from the billing info of each order as well as from customer relations so you'll notice 4 customer profile migrations.
  • Orders (and line items) come through. Line items maintain their references to the products so they will appear in Views-based reports.
  • Taxes and shipping.
  • Payment transactions.

What doesn't work yet:

  • Attributes - Products variations will be created but none of the attributes will be migrated. So this could be a manual mapping. #patcheswelcome
  • There are a number of things that will never be able to be addressed, as with all migrations. Every migration will require review and work on the migrated store.

7.x-1.x-dev branch:
Development is still active and patches are welcome.


  • You must install migrate before commerce_migrate_magento. The installer needs migrate's hooks to be available. If you skipped this step, it is ok, just make sure you do all of these other steps and you will be back in order:
  • To make all the migration classes visible to commerce_migrate_magento you must clear the caches.
  • Once you have all of your classes visible to the module, you must go to the commerce_migrate_magento configure page and put in your settings. You will need a second database in your settings.php.
  • When you are ready to begin click "register statically defined migrations" on migrate module's configuration page.
  • Go back to the main migrate page and you'll see migration groups per site, click the name of the group you want to run the migration. Run the migrations in order, one-by-one. Grouped migrations can sometimes get wonky if you run them all at once.
  • If you need to roll back, start from the last one and work your way up to avoid creating orphan content. Drupal needs complete entities to delete properly, and if part is missing it can be annoying to clear out all of your field tables related to the migration. If you do this by accident, just keep re-running, and when you get duplicate errors, rollback and then clear the table mentioned by the error. Even better if you just take a backup at the start and then you can easily go back without having to clear out any tables.