Data Migration in Drupal: CSV, JSON, API
Last updated: March 2026 · Reading time: 7 minutes
A new CMS is only as good as the data in it. Whether you are migrating from a legacy system, importing product data from a PIM, or loading location data from a spreadsheet — Drupal's Migrate framework makes the process reliable and repeatable.
The Migrate Framework Overview
Drupal's Migrate system works in three phases:
Source. Defines the data source: CSV file, JSON feed, database, REST API, or XML document. There are source plugins for each source type.
Process. Transforms the data: rename fields, convert values, resolve references, assign taxonomies. Process plugins are combinable and extensible.
Destination. Determines where the data is written: Nodes, Taxonomy Terms, Users, Media, or other Drupal entities.
Migration in Practice
CSV import. The most common case: data comes as an Excel export in CSV format. The Migrate Source CSV plugin reads the file line by line and maps columns to Drupal fields.
JSON/API import. Data from external systems — PIM, ERP, CRM — is retrieved via REST APIs and converted into Drupal content. This works as a one-time import or as a regular sync.
CMS migration. Content from WordPress, TYPO3, or other CMS is transferred via their database or export formats. Drupal includes specialized source plugins for common CMS platforms.
Repeatability. Migrations are stored as YAML configuration and versioned. They can be run any number of times — for testing, correcting, and final transfer.
Best Practices for Data Migration
Clean data before migrating. Inconsistent data produces errors. Clean the source data before you migrate.
Proceed step by step. Start with a small dataset, verify the result, then scale up. Debugging 100 records is easier than 100,000.
Plan for rollback. Drupal's Migrate framework supports rollbacks. Every migration can be reversed without manual cleanup.
Planning a Migration?
arocom plans and executes data migrations as part of the relaunch process. The Future Check evaluates the migration effort. From 2,500 EUR plus VAT, creditable toward the follow-up project.
How long does a migration take?
The technical implementation takes a few days to weeks, depending on complexity. The biggest effort lies in data cleanup and mapping definition. arocom plans migrations as part of the project plan.
Can migrations run automatically?
Yes. For scenarios where data is regularly imported from external systems, migrations can be automated via cron jobs or Drush commands.
What happens with images and files during migration?
Images and files are migrated as media entities. The Migrate framework downloads files from the source and places them in Drupal's file system. Metadata like alt texts can be co-migrated.
Discover a random article
How does Drupal hold up on your website? The Future Check shows where the biggest levers are — in 2–4 weeks.
Drupal Future Check
Checklist: Is your Drupal installation future-proof? 15 checkpoints.
Copy this prompt and paste it into ChatGPT, Claude, or another AI — you'll get a personal learning plan for „Data Migration in Drupal: CSV, JSON, API“.
You are an experienced coach for Drupal. I want to understand the topic "Data Migration in Drupal: CSV, JSON, API" and a...Was this article helpful?