Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Content Entity Sync (YAML)

No security coverage Under active development 92 sites

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.

Drupal 10–11

Ask your assistant about Content Entity Sync (YAML)

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
9
Tracked since
Jul 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 5
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP 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
2.0.0-alpha1 Pre-release 10 May 24, 2024
2.0.x-dev Dev 10 May 24, 2024
1.0.0 Stable 10 Jul 7, 2023
1.0.x-dev Dev 10 Jul 7, 2023