Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Content Entity Sync (YAML)

63 sites No security coverage Drupal 10–11
View on drupal.org

This module provides Drush commands to export and import content entities, allowing users to transfer content between Drupal sites by saving entities as YAML files. It supports all entity and field types.

This module provides Drush commands for exporting and importing content entities in Drupal. It simplifies the process of transferring content between Drupal instances by allowing users to export any content entity to YAML file and import them into another Drupal installation.

Supports all entity types and all field types.

composer require drupal/content_entity_sync

Features

This module provides a user-friendly and efficient solution for content synchronization.

drush content-entity-sync:export (or drush conex/drush cox): This command allows you to export content entities. You can specify the entity type and optionally filter by bundle. For example, to export all nodes of the "article" bundle, you would run
drush content-entity-sync:export node --bundle=article.

drush content-entity-sync:import (or drush conim/ drush coi): This command is used to import content entities from YAML files. By default, it imports all content entities from the configured content directory. You can also specify the entity type and optionally filter by bundle. For example, to import only nodes of the "page" bundle, you would run
drush content-entity-sync:import taxonomy_term --bundle=tags.

Post-Installation

It is important to note that before using the module, you need to set up the content directory where the exported YAML files will be stored and read from during the import process. This configuration is typically done in Drupal's settings.php file or in a dedicated configuration file.

/**
 * Sets the directory path for storing exported content entities.
 *
 * The $settings['content_sync_directory'] configuration option
 * specifies the directory where the exported content entities will be
 * stored as YAML files during the export process. The value
 * '../content/sync' represents a relative path to the desired
 * directory. In this case, it suggests that the 'content' directory
 * is located in the parent directory of the Drupal installation, and
 * within it, there is a 'sync' directory.
 *
 * Make sure that the specified directory is writable by the web
 * server or the Drupal application, allowing the Content Entity Sync
 * module to successfully write the exported YAML files to the
 * specified directory during the export process.
 *
 * Example: $settings['content_sync_directory'] = '../content/sync';
 */
$settings['content_sync_directory'] = '../content/sync';

By configuring this setting, the Drupal Content Entity Sync module will use the specified directory to store the exported YAML files. This directory serves as a storage location for the exported content entities, allowing them to be easily accessed and imported into other Drupal installations or used for backup purposes.

Menu Link Config: Add menu items from configuration. Works well with entity config dependency names.

Similar projects

Single Content Sync - https://www.drupal.org/project/single_content_sync
Entity Migrate Export - https://www.drupal.org/project/eme
Content Synchronization - https://www.drupal.org/project/content_sync
Content Entity Sync - https://www.drupal.org/project/2890377/git-instructions
Structure Sync - https://www.drupal.org/project/structure_sync

Supporting this Module

Please open an issue.

Depends on

Dependencies of the latest stable release

  • field Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Nov 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 5
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
2.3.0 Stable 10–11 Feb 15, 2025
2.2.1 Stable 10–11 Jan 14, 2025
2.1.1 Stable 10 Jan 14, 2025
2.2.0 Stable 10–11 Jan 14, 2025
2.1.0 Stable 10 Nov 23, 2024