---
title: "Data Migration in Drupal: CSV, JSON, API"
lang: en
type: knowledge
canonical: https://www.arocom.de/en/knowledge/drupal/data-migration
alternate: https://www.arocom.de/wissen/drupal/datenmigration
author: "Axel Roth"
last_updated: 2026-10-31
---

# Data Migration in Drupal: CSV, JSON, API

Drupal's Migrate framework transfers content from CSV files, JSON
feeds, XML documents, and REST APIs into structured Drupal content
types. The process is repeatable, versionable, and testable. arocom
has implemented migrations for projects with hundreds to hundreds of
thousands of records since 2012 and has standardized the process.

## Data Migration in Drupal: CSV, JSON, API

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.
For the switch from TYPO3 we offer a
[dedicated migration service](https://www.arocom.de/en/services/typo3-to-drupal).

**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](https://www.arocom.de/en/future-check)
evaluates the migration effort. From 2,500 EUR plus VAT,
creditable toward the follow-up project.

- [Request Drupal Upgrade](https://www.arocom.de/en/services/drupal-upgrade)

**From arocom projects:**

- At COFAD the challenge wasn't the tech, it was the cross-linking: consultants, projects, topics, all interconnected, all searchable. Drupal 11 with 20 tailored modules, a Search API index, and an Entity Browser workflow made that everyday business.
- Sometimes 'less Drupal' is the right answer: for d&b's venues DB we deliberately wrote only 4 custom modules and leaned on standard ones (Entity Browser, Imagemagick). Today the platform is near maintenance-free and survives each Drupal major version with minimal effort.

### 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.

## Read more

- [Agency switch](https://www.arocom.de/en/agency-switch): Planning the transition structurally
- [SEO during relaunch](https://www.arocom.de/en/knowledge/seo-geo/seo-relaunch): Preserving rankings during relaunch
- [Drupal explained](https://www.arocom.de/en/knowledge/drupal/what-is-drupal): What Drupal is and what it is not
