Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

default_content_deploy

2,058 sites Security covered
View on drupal.org
  • Export and deploy content to other instances
  • Optionally maintain it in git
  • Takes care about relations and dependencies, even in links or text
  • Handles different entity IDs on different instances

WARNING! Due to a critical bug in the HAL module, entity references get lost during import with 2.2.0

There's a pending patch for the HAL module to fix the issue:
#3517446: Cached relation IDs are broken

Introduction

This module (DCD) provides content deployment and allows development and building sites without the need to transfer database between the sites. The development team can export and deploy all content via Git and content can be deployed to the staging servers automatically during common deploy processes. Module provides useful drush commands for export/import content. Import function can also be ran from administration interface.

There's also an integration in Search API that leverages Search API's capabilities to track content changes and filter them to configure different "continuous content export streams".

DCD is also suitable to synchronize content between different instances in production.

Join Our Drupal Slack Channel for support.

Requirements

This module does not depend on the Default Content module (default_content)!

If you want to export files you should install the optional requirement Better Normalizers (better_normalizers).

If you want to export Layout Builder settings per entity or translations you'll currently run into two core issues you should patch:

Installation

Download and enable module.

Configuration

Set DCD content directory in settings.php. We recommend to place directory outside of the document root. If no configuration is found, directory is created automatically at 'public://content_' . $hash_salt;

Example

// Relative path.
$settings['default_content_deploy_content_directory'] = '../content';
// Absolute path.
$settings['default_content_deploy_content_directory'] = '/var/dcd/content';

Usage - Drush commands

Read detail information about drush commands in README.md.

  • default-content-deploy:export (dcde) Exports a single entity or group of entities.
  • default-content-deploy:export-with-references (dcder) Exports a single entity or group of entities with references.
  • default-content-deploy:export-site (dcdes) Exports a whole site's content.
  • default-content-deploy:import (dcdi) Import all the content defined in a content directory.
  • default-content-deploy:uuid-info (dcd-uuid-info) Get current System Site, Admin and Anonymous UUIDs, Admin name.
  • default-content-deploy:entity-list (dcd-entity-list) List current content entity types.

How the content is imported

drush dcdi

  • Imported entity is determined by UUID (it can be either new or already existing).
  • ID of an entity is not preserved unless the --preserve-ids option is used (and you know what you're doing), so it can change its ID to avoid conflicts.
  • References by entity ID will be corrected during import based on UUIDs
  • Existing entity is updated only if imported entity is newer (by timestamp of the last entity change across all translations).
  • Imported entity with the same or older time than the current existing entity is skipped.
  • This behavior can be changed by parameter --force-update

drush dcdi --force-update

  • Existing entity is overwritten by the imported entity (the old entity is deleted and a new entity with the same entity ID is created from imported JSON file).
  • There is an exception for the user-type entity that only updates the UUID and the username, because overwriting a user entity would result in creating a blocked user without password and email (the user entity export JSON file doesn't contain such information).

drush dcdi --verbose
Print detailed information about importing entities.

If you can not use Drush for import, go to page /admin/config/development/dcd-import.

Team workflow - how to synchronize configuration and content between sites

Please, read the README.md for detailed information.

Credits

Originally written by @martin_klima and @hnilickajakub with kind support of @hideaway.
Maintained by @miroslav-lee @mkalkbrenner.

Activity

Total releases
6
First release
Feb 2025
Latest release
11 months ago
Release cadence
15 days
Stability
33% stable

Release Timeline

Releases

Version Type Release date
2.2.0-beta3 Pre-release May 14, 2025
2.2.0-beta2 Pre-release Apr 28, 2025
2.2.0-beta1 Pre-release Apr 9, 2025
2.2.x-dev Dev Mar 28, 2025
2.1.4 Stable Mar 6, 2025
2.1.2 Stable Feb 26, 2025