Drupal core provides a number of Migrate process plugins, and further process plugins are available in contrib modules. If you need to write your own custom process plugin, refer to Writing a process plugin documentation page.
Process plugins provided by the core Migrate module
The core Migrate module provides several general use process plugins that can be used in migrations.
- array_build
Builds an array based on the key and value configuration. - callback
Passes the source value to a callback. - concat
Concatenates a set of strings. Use constants to prefix, suffix and separate imported values, and insert custom text. - DedupeBase
Deprecated in 8.4.x, removed in 9.0.x. Use MakeUniqueBase instead. - dedupe_entity
Deprecated in 8.4.x, removed in 9.0.x. Use make_unique_entity_field instead. - default_value
Returns a given default value if the input is empty. - download
Downloads a file from a HTTP(S) remote location into the local file system. - entity_exists
Checks if a given entity exists. - explode
Splits the source string into an array of strings, using a delimiter. - extract
Extracts a value from an array. - file_copy
Copies or moves a local file from one place into another. - flatten
Flattens the source value. - format_date
Converts date/datetime from one format to another. - get
Gets the source value. - iterator
Deprecated in 8.4.x, removed in 9.0.x. Use sub_process instead. - log
Logs values without changing them. - machine_name
Creates a machine name. - menu_link_parent
Figures out menu link parent plugin IDs. Additional documentation. - migration
Deprecated in 8.3.x, removed in 9.0.x. Use migration_lookup instead. - migration_lookup
Looks up the value of a property based on a previous migration. - MakeUniqueBase
Ensures the source value is unique. Abstract base class. See make_unique_entity_field. - make_unique_entity_field
Ensures the source value is made unique against an entity field. - null_coalesce
Returns the first non-null value in the input array. - route
Sets the destination route information based on the source link_path. - skip_on_empty
Skips processing the current row when the input value is empty. - skip_row_if_not_set
Skips processing the current row when a source value is not set. - static_map
Changes the source value based on a static lookup map. - substr
Returns a substring of the input value. - sub_process
Runs an array of arrays through its own process pipeline. - urlencode
URL-encodes the input value.
Process plugins provided by other core modules
Other core modules provide more specialized process plugins to support migration from Drupal 6 and Drupal 7. These plugins are less reusable but may serve as examples for other specialized process plugins.
- block_plugin_id
- block_region
Map regions in the source site's theme to regions in the destination site's theme. - block_settings
Map block settings. - block_theme
Map a block's theme. - block_visibility
Deprecated. Use themigrate.lookupservice instead. - field_type
Map field types. - field_type_defaults
Deprecated in 8.6.x, removed in 9.0.x. Used6_field_type_defaultsord7_field_type_defaultsinstead. - process_field
Get the value from a method call on a field plugin instance. - field_formatter_settings_defaults
Set field formatter settings when the map didn't map: for date formatters, the fallback format, for everything else, empty array. - d6_field_instance_defaults
Map field instance defaults for Drupal 6. - d6_field_instance_option_translation
Determines the settings property and translation for boolean fields. - d6_field_field_settings
Map field instance settings for Drupal 6. - field_instance_widget_settings
Get the field instance widget settings. - d6_field_option_translation
Determines the allowed values translation for select lists. - field_settings
Get the field default/mapped settings. - d6_field_type_defaults
Gives us a chance to set per field defaults. - d7_field_instance_defaults
Map field instance defaults for Drupal 7. - d7_field_instance_option_translation
Determines the settings property and translation for boolean fields. - d7_field_instance_settings
Map field instance settings for Drupal 7. - d7_field_option_translation
Determines the allowed values translation for select lists. - d7_field_settings
Get the field default/mapped settings. - d7_field_type_defaults
Gives us a chance to set per field defaults. - d6_cck_file
Deprecated in 8.3.x, removed in 9.0.x. Use themigrate.lookupservice instead. - d6_field_file
Deprecated. Use themigrate.lookupservice instead. - file_uri
Process the file url into a D8 compatible URL. - filter_id
Maps text filter IDs. - filter_settings
Adds the default allowed attributes tofilter_html'sallowed_htmlsetting. - filter_format_permission
Migrate filter format serial to string id in permission name. - d6_imagecache_actions
Maps imagecache actions. - content_translation_enabled_setting
Determines the content translation setting. - language_domains
This plugin makes sure that no domain is empty if domain negotiation is used. - language_negotiation
Processes the arrays for the language types' negotiation methods and weights. - language_types
Processes the array for the language types. - field_link
Transform a pre-Drupal 8 formatted link for use in Drupal 8. - d6_cck_link
Deprecated in 8.3.x, removed in 9.0.x. Usefield_linkinstead. - d6_field_link
Deprecated in 8.4.x, removed in 9.0.x. Usefield_linkinstead. - link_uri
Generates an internal URI from the source value. - LinkUri
Deprecated in 8.2.x, removed in 9.0.x. Uselink_uriinstead. - InternalUri
Deprecated in 8.2.x, removed in 9.0.x. Uselink_uriinstead. - node_complete_node_lookup
Returns only thenidfrommigration_lookuponnode_completemigration. - node_complete_node_revision_lookup
Returns only thevidfrommigration_lookuponnode_completemigration. - node_complete_node_translation_lookup
Returnsnidandlangcodefrommigration_lookuponnode_completemigration. - node_update_7008
Split the 'administer nodes' permission from 'access content overview'. - path_set_translated
A process plugin to update the path of a translated node. - d6_url_alias_language
Url alias language code process. - search_configuration_rankings
Generate configuration rankings. - d6_search_configuration_rankings
Deprecated in 8.7.x, removed in 9.0.x. Usesearch_configuration_rankingsinstead. - system_update_7000
Rename blog and forum permissions to be consistent with other content types. - timezone
Process the D6 Timezone offset into a D8 compatible timezone name. - forum_vocabulary
Checks if the vocabulary being migrated is the one used for forums. - convert_tokens
Plugin to replace!tokenswith[tokens]. - profile_field_settings
Maps profile field settings. - user_langcode
Provides a process plugin for the user langcode. - user_update_8002
Keep the predefined roles forrid1 and 2. - d6_profile_field_option_translation
Determines the settings property and translation. - user_update_7002
Converts user time zones from time zone offsets to time zone names.
Process plugins provided by Migrate Plus
The contributed Migrate Plus module provides several useful process plugins.
- array_pop - The "extract" plugin in core can extract array values when indexes are already known. This plugin helps extract the last value in an array by performing a "pop" operation.
- array_shift - The "extract" plugin in core can extract array values when indexes are already known. This plugin helps extract the first value in an array by performing a "shift" operation.
- array_template - Builds an array based on configuration, source, destination, and pipeline.
- default_entity_value - Returns EntityLookup for a given default value if input is empty.
- dom - Allows you to convert a string to a DOMDocument object and back; see also: DomProcessBase, a base class for manipulating the object before converting back to a string.
- dom_apply_styles - Extends DomProcessBase; replace certain markup with specific styles defined for the Styles menu in CKEditor.
- dom_migration_lookup - Extends DomStrReplace; allows replacements on a source dom based on migration_lookup.
- dom_remove - Remove nodes from a DOMDocument object.
- dom_select - Select strings from a DOMDocument object.
- dom_str_replace - Extends DomProcessBase (use this plugin with dom process plugin). Analogous to str_replace, but based on a \DOMDocument instead of a string.
- entity_generate - Extends entity_lookup to actually generate an entity from the source data where one does not already exist. For details and example usage, see Contrib process plugin: entity_generate.
- entity_lookup - Allows you to match source data to existing Drupal 8 entities and return their IDs (primarily for populating entity reference fields).
- entity_value - Allows you to get a field value from an entity, when the entity ID is provided as the source data.
- file_blob - Allows you to create a file (and corresponding file entity) from blob data.
- gate - Allow a source value to pass through the gate conditionally. Imagine the source value as wanting to get through the gate. We provide a different source/destination field that acts as the key. We compare to a set of valid keys. We declare whether the key locks the gate or unlocks the gate. This is different from skip_on_value because in that plugin, the source is compared to a value. In this plugin, the source is not compared to anything. The source just wants to get through a gate that is operated by another source/destination field. Unlike skip_on_value, there is no configurable method. The method is essentially restricted to 'process'. The source is not modified if it passes through the gate.
- merge - Allows you to merge multiple source arrays into one array.
- multiple_values - Converts from a single value to multiple so that the next plugin in the process pipeline treats the values individually instead of an array of values.
- service - Allows you to call a method of a service class (similar to core's callback plugin).
- single_value - Treats an array of values as a single value.
- skip_on_value - Like core's skip_on_empty, but allows you to skip either the row or process upon matching (or not) a specific value.
- str_replace - Wrapper around str_replace, str_ireplace and preg_replace.
- transpose - Exchange rows and columns. This will create an array of n-elements, numerically indexed arrays. Each array will have one element from each of the source properties.
Work in Progress
These plugins are not finished yet, feel free to help get them ready.
- wildcard - Adds support for wildcards in the urls configuration key.
- pdf_parser - Enables import of PDF files.
- d7_url_alias_filter - extends UrlAlias to only migrate certain URL aliases.
- d7_user_role_filter - extends User to only migrate users with certain roles.
- configuration_value - Returns a value from the current site configuration.
Process plugins provided by Migration Tools
- convert_boolean
Convert specific string-like booleans to actual boolean and FALSE to a 0. With optional mapping for what becomes 1 or 0. - create_default_paragraph_revision
Create default paragraph entity reference revisions from default values (not source values) - gate_comparator - Compares two values to determine if the source, a backup value should be used.
- skip_on_not_empty - Skip a row or process based on a value not being empty.
- skip_on_substr
Skips row or process based on presence or absence of a substring.
Writing a custom process plugin
If neither the general use process plugins listed above nor those provided by the contributed modules Migrate Plus or Migrate Process Extra meet the transformation needs for your migration, it is possible to write a custom process plugin. See documentation for writing a custom process plugin.