Block Migration
Block Migration provides Drush commands to export and import custom block content with full multilingual support. This tool helps deploy blocks between environments, share them across sites, and manage them through version control.
The Problem: Drupal's Configuration Management system exports block configuration (placement, visibility settings, plugin configuration), but it cannot export custom block content. Custom blocks created at /block/add are content entities, not configuration, leaving a gap when deploying blocks between environments or sharing them across sites. Existing solutions like Default Content focus on nodes and other entity types, but lack robust block-specific migration tools with translation support.
The Solution: Block Migration provides Drush commands to export and import custom block content between Drupal sites with full multilingual support, filling this critical gap in Drupal's deployment workflow.
Use cases:
- Migrate blocks between development, staging, and production environments
- Share block configurations across multisite installations
- Back up and restore block content as code
- Deploy block content via version control
Key features:
- Supports any block bundle (basic, custom types, etc.)
- Auto-detects and exports all custom fields
- Full translation support - one YAML file per language
- Flexible filtering by block IDs, bundles, languages, or label patterns
- Safe mode (skip existing) and override mode (update existing)
- Dry-run preview option
- Compatible with 15+ field types including text, entity references, images, links, dates, and more
Requirements:
- Single Content Sync module (for import functionality)
- Drush 10 or higher
Basic usage:
drush bm-export /path/to/output
drush bm-import /path/to/yaml
See the README for complete documentation and advanced filtering options.
Depends on
Dependencies of the latest stable release
- Single Content Sync
- block_content Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0 | Stable | 10–11 | Stable version of Block Migration module | Jun 10, 2026 | |
| 1.x-dev | Dev | 10–11 | Block Migration provides Drush commands to export and import custom block content between Drupal sites with full multilingual support, filling this critical gap in Drupal's deployment workflow. | Feb 22, 2026 | |
| 1.0.x-dev | Dev | 10–11 | First development release of Block Migration | Feb 20, 2026 |