When one starts working with migrations, it is easy to be overwhelmed by so many modules providing migration functionality. Throughout the series, we presented many of them trying to cover one module at a time. We did this to help the reader understand when a particular module is truly needed and why. But we only scratched the surface. Today’s article presents a list of migration related Drupal modules, all good for Drupal 8, for quick reference. Let’s get started.
Core modules
At the time of this writing, Drupal core ships with four migration modules:
- Migrate: provides the base API for migrating data.
- Migrate Drupal: offers functionality to migrate from other Drupal installations. It serves as the foundation for upgrades from Drupal 6 and 7. It also supports reading configuration entities from Drupal 8 sites.
- Drupal Migrate UI: provides a user interface for upgrading a Drupal 6 or 7 site to Drupal 8.
- Migrate Drupal Multilingual: is an experimental module required by multilingual translations. When they become stable, the module will be removed from Drupal core. See this article for more information.
Migration runners
Once the migration definition files have been created, there are many options to execute them:
- Migrate Tools: provides Drush commands to run migrations from the command line. It also exposes a user interface to run migrations created as configuration entities. It offers support for migration groups and tags. The module depends on Migrate Plus.
- Migrate Run: provides Drush commands to run migrations from the command line. It does not offer support for migration groups, but tags are supported. The module does not depend on Migrate Plus.
- Migrate Upgrade: provides Drush support for upgrading a Drupal 6 or 7 site to Drupal 8.
- Migrate Manifest: provides a Drush command for running migrations using a manifest file. See this article for an example of using this module for Drupal upgrades.
- Migrate Scheduler: integrates with Drupal Core’s Cron API to execute migrations on predefined schedules.
- Migrate Cron: exposes a user interface to execute migrations when Cron is triggered. At the time of this writing, the module does not execute dependent migrations. Follow this issue for updates.
- Migrate source UI: provides a form for uploading files to use as source for already defined CSV, JSON, and XML migrations. At the time of this writing, it seems that JSON and XML migrations are not being detected. Follow this issue for updates.
Source plugins
The Migrate API offers many options to fetch data from:
- Migrate (core module): provides the `SqlBase` abstract class to help with fetching data from a database connection. See this article for an example. It also exposes the `embedded_data` plugin which allows the source data to be defined inside the migration definition file. It was used extensively in the example migrations of this series. It also offers the `empty` plugin which returns a row based on provided constants. It is used in multilingual migrations for entity references.
- Migrate Plus: combining various plugins, it allows fetching data in JSON, XML, and SOAP formats. It also provides various plugins for parsing HTML. See this article by Benji Fisher for an example. There is also a patch to add support for PDF parsing.
- Migrate Source CSV: allows fetching data from CSV files.
- Migrate Google Sheets: leverages Migrate Plus functionality to allow fetching data from Google Sheets.
- Migrate Spreadsheet: allows fetching data from Microsoft Excel and LibreOffice Calc files.
- Migrate Source YAML: allows fetching data from YAML files.
- WP Migrate: allows fetching data from a WordPress database.
Destination plugins
The Migrate API is mostly used to move data into Drupal, but it is possible to write to other destinations:
- Migrate (core): provides classes for creating content and configuration entities. It also offers the `null` plugin which in itself does not write to anything. It is used in multilingual migrations for entity references.
- Migrate Plus: provides the `table` plugin for migrating into tables not registered with Drupal Schema API.
- CSV file: example destination plugin implementation to write CSV files. The module was created by J Franks for a DrupalCamp presentation. Check out the repository and video recording.
Development related
These modules can help with writing Drupal migrations:
- Migrate (core): provides the `log` process plugin. See this article for an example of its use.
- Migrate Devel: offers Drush options for printing debug information when executing migrations. It also provides the `debug` process plugin. See this article for an example of its use.
- Migrate Process Vardump: provides the `vardump` plugin. It works like the `debug` plugin.
Field and module related
- Migrate Media Handler: provides migration process plugins to facilitate the migration into Drupal 8 media entities. The source can be Drupal 7 file or image fields. It also supports inline file embeds in rich text. It leverages the DOM parsing plugins provided by Migrate Plus.
- Media Migration: provides an upgrade path from Drupal 7 to Drupal 8 media entities. The source can be image fields and fields attached to media and file entities.
- Migrate File Entities to Media Entities: migrates Drupal 8.0 file entities to Drupal 8.5 media entities.
- Migrate Files: provides process plugins for migrating files and images.
- Webform Migrate: provides a plugin to help migrating from the Drupal 6 and 7 versions of the Webform module.
- Migrate HTML to Paragraphs: turns HTML markup into paragraph entities.
- Commerce Migrate: offers a general purpose migration framework for bringing store information into Drupal Commerce.
- Address: offers a process plugin to migrate data into fields of type address. It also provides an upgrade path from Drupal 7’s Address Field module. See this article for an example.
- Geofield: offers a process plugin to migrate data into fields of type geofield. See this article for an example.
- Office Hours: offers a process plugin to migrate data into fields of type office hours.
- Workbench Moderation to Content Moderation: migrates configuration from one module to the other.
Modules created by Tess Flynn (socketwench)
While doing the research for this article, we found many useful modules created by Tess Flynn (socketwench). She is a fantastic presenter who also has written about Drupal migrations, testing, and much more. Here are some of her modules:
- Migrate Directory: imports files from a directory into Drupal as managed files.
- Migrate Process S3: downloads objects from an S3 bucket into Drupal.
- Migrate Process URL: provides a process plugin to make it easier to migrate into link fields.
- Migrate Process Vardump: helps with debugging migrations.
- Many process plugins that wrap PHP functions. For example: Migrate Process Array, Migrate Process Trim, Migrate Process Regex, Migrate Process Skip, and Migrate Process XML.
Miscellaneous
- Feeds Migrate: it aims to provide a user interface similar to the one from Drupal 7’s Feeds module, but working on top of Drupal 8’s Migrate API.
- Migrate Override: allows flagging fields in a content entity so they can be manually changed by side editors without being overridden in a subsequent migration.
- Migrate Status: checks if migrations are currently running.
- Migrate QA: provides tools for validating content migrations. See this presentation for more details.
What did you learn in today’s blog post? Did you find a new module that could be useful in current or future projects? Did we miss a module that has been very useful to you? Share your answers in the comments. Also, I would be grateful if you shared this blog post with others.
Next: Introduction to Drupal 8 upgrades
This blog post series, cross-posted at UnderstandDrupal.com as well as here on Agaric.coop, is made possible thanks to these generous sponsors: Drupalize.me by Osio Labs has online tutorials about migrations, among other topics, and Agaric provides migration trainings, among other services. Contact Understand Drupal if your organization would like to support this documentation project, whether it is the migration series or other topics.
Sign up to be notified when Agaric gives a migration training:
Comments
2019 September 16
joseph.olstad
Wow thanks for the overview…
Wow thanks for the overview. In a recent (2018/19) D7 to D8 upgrade we did not use migrate, we wrote our own custom scripts exporting D7 nodes to JSON and then we wrote another script for D8 to import from json. The advantage of using json as an intermediary allowed us to reprocess the json as needed. However I am curious to see how well Migrate is in sept 2019. I hope the multilingual migrate is in good shape, this is crucial to my clients.
2019 September 17
mlncn
Thank you Joseph for your…
Thank you Joseph for your kind words!
Note that if you end up still preferring the JSON intermediary step, you can still get use Migrate for the import, and get some of the benefits like rollback, possibly easier field mapping, transformations that rely on some knowledge the Drupal 8 site has, etc.
And of course Mauricio has a blog post about migrating from JSON, too.
Add new comment