The Drupal 8 Migrate API and related tools are used to import data such as content, users, and configuration values into Drupal. The system consists of three core modules: Migrate, Migrate Drupal, and Migrate Drupal UI. A growing number of contributed modules also aid in writing and executing a migration. In Drupal 7 the migration API is provided by the Migrate contributed module.
As a developer you'll use the Migrate API in Drupal 8 to write migration plugins that extract data from a defined source, transform it to match with your Drupal data model, and then load it into Drupal via the Entity or Config APIs. You'll then use one or more contributed modules to execute, rollback, and debug your data migration.
- Import data from a CSV file, MySQL database, or other source into Drupal
- Migrate from WordPress or another CMS to Drupal
- Provide an update path for users of your module when porting it to Drupal 8
The Migration API in Drupal 8 changed significantly between 8.0.x and 8.1.x. Parts of the API are still experimental and continue to evolve, though we doubt they'll change significantly again. If you're doing anything with migrations we recommend using the latest stable version of Drupal 8.x.
Our extensive migration guide covers everything you need to know to get started writing, executing, and debugging Drupal 8 migrations. We recommend the following starting points:
- Introduction to Migrations with Drupal 8
- Start here if this is the first time you've used Drupal 8's migration tools
- Write a Custom Migration
- Use this if you've worked with migrations before and are just looking for a refresher on how to write a migration YAML file or want some examples to copy and paste.
- Run a Custom Migration
- Use Drush to run a custom migration, rollback a failed migration, and debug an in-process migration.
- Learn to write custom source plugins and process plugins
- Source plugins allow you to customize what data is extracted from an existing source, or add entirely new data sources. Process plugins allow you to transform data during an import. If you're providing an update path for an existing module you'll likely need to write a source plugin.
- Upgrade to Drupal 8 topic
- Our resource page for upgrading your site using the Migrate API.