In this post, we will discuss the base knowledge needed to understand how migration works in Drupal 8.
Migrations in Drupal 8 follows the ETL process which stands for Extract, Transform and Load.
For the Drupal migration process, the Extract phase is called "source" and is handled by source plugins. The Transform phase is called "process", handled by process plugins, and the Load phase is called "destination" handled by destination plugins.
The Migrate core module provides an API for migrating configuration and content to Drupal 8.
The first step is to extract data from a source and return it as a set of rows. The source is typically a Drupal 6 or 7 database, but it can also be a CSV, JSON, or XML file.
Each core module implements their own source plugins that can be used to migrate content or configurations from Drupal 6 or Drupal 7 sites. For example. the source plugins for User module can be found at
You can also create your own custom source plugins to extend core source plugins in your custom modules.
Each row of data provided by source plugins can be passed through one or more process plugins, which operate on the source data to transform it into the desired format.
A list of core process plugins can be found here.
Process plugins for User core module can be found at
Destination plugins are responsible for saving new data as Drupal content (node, user, taxonomy, etc.) or configuration (content types, fields).
Destination plugins for User core module can be found at
Migration plugin definitions are stored in a module's 'migrations' or 'migration_templates' (for backward compatibility) directory. Examples of migration plugin definitions can be found at