Part 2: Let’s Get Started
Published on: 23 Nov 2025
In this section, we will look at creating Content Types, Fields, and navigating the migration interface.
1. Installation
Before starting to migrate, we first need to install the Drupal Core Migrate and 2 additional extensions:
- Migrate Plus: Enables us to migrate from files like JSON and group the migrations.
- Migrate Tools: Enables migration CLI drush commands (like
migrate:status,migrate:import) and the Web UI.
Run these commands in your terminal:
ddev ssh
composer require migrate_plus migrate_tools
drush en migrate migrate_plus migrate_tools
2. Create Content Type & Fields
To migrate data into Drupal, we first need to create a content type and the field where the data will be stored.
Let’s start by creating an “Organisation” content type with some sample fields to demonstrate.
- Name: We do not need to create a field called “name” because that will be saved in the default
Titlefield in Drupal. - ID: Number field.
- Short Description: Text (long).
Note: I will be using some sample data of 5 random companies that I asked AI to create for me in JSON format.
3. Importing your Migration YAML
We need YAML code to migrate the data (I will explain the YAML details in the next guide). This step is about where to paste that code.
- Go to your Drupal development website.
- Navigate to Drupal admin: Configuration → Development → Configuration Synchronization.
- Select the ‘Import’ tab.
- Select the ‘Single Item’ tab.
- In the dropdown for Configuration Type, select Migration.
- Paste your YAML code into the box below.
- Click ‘Import’ and ‘Confirm’.
Note: This is my prefered way of importing the migration YAML. I believe there are other methods to import migration but it was too confusing for me.
4. How to Execute the Migration
There are two methods to execute the migration:
Method A: The UI (User Interface)
- Navigate to Drupal Admin: Structure > Migrations.
- Note: It may take a little while for the migration to appear; you can try to rebuild the cache.
- Click the ‘List Migration’ button.
- Click the ‘Execute’ button.
- Click another ‘Execute’ button on the next page.
Method B: The CLI (Terminal)
- Go to your terminal.
- Enter the following command:
ddev drush migrate:import [migration_id]
That’s all for today. I will teach more about different migration CLI commands and how to write the migration YAML in future guides!