AI coding assistants are changing how developers work. But when it comes to Drupal migrations — moving a complex site from D7 (or another platform) to Drupal 11 — how much can AI actually help? We've been testing this on real projects. Here's what we've found.

Where AI Genuinely Helps

Field Mapping Discovery

A Drupal 7 site with 15 content types, 200+ fields, and years of configuration changes is a maze. AI tools can analyze the source database schema and generate an initial field mapping — source field to destination field — in minutes instead of hours. It's not perfect, but it gives you a 70% starting point that a developer can refine. For large migrations, this alone saves days of tedious discovery work.

Data Cleanup and Normalization

Legacy databases are messy. Phone numbers in three different formats. Addresses split inconsistently across fields. HTML from a WYSIWYG editor that was last updated in 2012. AI is surprisingly good at normalizing this kind of data — standardizing formats, fixing encoding issues, and flagging records that need human review. We've used it to clean up thousands of records that would have taken weeks to process manually.

Code Conversion Scaffolding

Drupal 7 hooks and procedural code need to become Drupal 11 services, plugins, and event subscribers. AI can convert a D7 hook implementation into a reasonable D11 equivalent as a starting point. The output always needs review and usually needs adjustment, but it eliminates the blank-page problem and gets you to a working draft faster. It's particularly useful for straightforward hooks like hook_form_alter or hook_node_presave.

Test Generation

Writing migration tests is important and tedious. AI can generate PHPUnit test scaffolding — testing that source records produce the expected destination entities with the right field values. You still need to verify the assertions and add edge cases, but the boilerplate generation is a genuine time saver.

Documentation Drafting

Migration projects produce a lot of documentation: field mapping tables, decision logs, content type comparisons. AI can draft these documents from your migration configuration and source analysis, giving your team a starting point that's faster to edit than to write from scratch.

Where AI Falls Short

Migration Plugin Architecture

Drupal's Migrate API has a specific architecture: source plugins, process plugins, and destination plugins connected through YAML configuration. AI tools can write simple migration YAML, but they struggle with the nuances — proper plugin ordering in process pipelines, handling entity references that depend on other migrations, and the migration_lookup patterns that make complex migrations work. A developer who understands the Migrate API still needs to architect the migration. AI can fill in the details, but not design the system.

Edge Cases and Business Logic

Every migration has edge cases. Content that was entered inconsistently. Fields that changed meaning over the years. Business rules that exist only in the heads of long-tenured staff. AI has no way to know that "Category 7" in your legacy database actually means "Archived — do not migrate" because someone decided that in a meeting five years ago. These discoveries still require human investigation and stakeholder conversations.

Rollback and Incremental Strategy

Planning a migration's rollback strategy, deciding on incremental vs. full migration, and managing the cutover sequence are architectural decisions that depend on the client's downtime tolerance, content velocity, and team capacity. AI can explain the options, but it can't make the judgment call for your specific situation.

Performance Optimization

When a migration of 50,000 nodes is running too slowly, the fix is rarely straightforward. It might be a missing database index, a process plugin doing an entity load per row, or a memory leak in a custom source plugin. Diagnosing and fixing migration performance requires understanding both the Migrate API internals and the specific data being processed. AI can suggest general optimization patterns, but it can't profile your specific migration.

Our Approach

We use AI tools as accelerators, not replacements. On a typical migration project, AI might save us 20-30% of the total development time — mostly in discovery, data cleanup, and scaffolding. But the architecture, the edge case handling, the testing strategy, and the client communication are still fundamentally human work. The migrations we deliver are built on 25 years of experience, with AI helping us get there faster.

If you're planning a migration and wondering how modern tooling can help, we'd be happy to walk you through our process.