Entity Migrate Export
Entity Migrate Export (EME) is a tool that generates Drupal migration modules to export entity instances from one Drupal site to another. It automatically includes referenced entities and creates a custom module with migration definitions that can be used with Migrate Tools or Drush.
Entity Migrate Export (EME) is a Drupal (8|9|10) to Drupal (8|9|10) migration generator tool. With this module, you are able to export entity instances of the specified content entity types into migrations. Every content entity referred by a reference field will also be included.
EME generates a module with a set of migration plugin definitions and data sources. After installing the generated module (its name defaults to eme_content), you will be able to import the entities (e.g. nodes, files, media, comments etc) with Migrate Tools or with Drush 10.4.0+.
This module does not depend on any contrib module. However, the generated migrations (and the module as well) require Migrate Plus.
Usage
Exporting content
From UI
- Visit the Settings form at
/admin/config/development/entity-export/settingsand customize the default settings based on your needs. - Go to the export form at
/admin/config/development/entity-export, select which type of entities do you want to export to migrations, and submit the form. - At the end of the batch process, you will get the generated migration module.
With Drush
-
drush eme:export \ --id my_project_dev \ --types node,block_contentThis is equivalent to:
drush eme:export \ --module my_project_dev_content \ --group my_project_dev \ --id-prefix my_project_dev \ --types node,block_content \ --name 'My Project Dev Content Entity Migration' \ --destination modules/custom
Import the migrations
- Install Migrate Tools and Migrate Plus.
- Enable the generated module (its default name is
eme_migrate). - Execute the migrations with the group name (group defaults to
eme):
drush migrate:import --tag my_project_dev --execute-dependencies
Update previous export
From UI
- Go to the collection form at
/admin/config/development/entity-export/collection. - Press the "Reexport" button of the collection you want to update with new content.
With Drush
drush eme:export --update my_project_dev_content
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.1 | Stable | 8–11 | Apr 3, 2025 |