Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Structure Sync

Security covered Under active development 18,080 sites

Structure sync allows you to synchronize taxonomy terms, menu links, and custom blocks between different environments. This helps prevent duplication and ensures consistency by treating these elements as configuration rather than just content. The module offers both a user interface and Drush commands for exporting and importing these items, with options for safe, full, or forceful synchronization.

Some websites might contain elements that are considered content by the Drupal CMS while they might not only be used as content. For example custom blocks might be used for a footer that is shared between all environments. Structure sync tries to give you a tool to get around this issue by allowing you to synchronize taxonomy terms, menu links and custom blocks through the configuration.

The module will prevent you from having to create content multiple times and also decrease the risk of some elements being out of sync between environments, the main menu for example. It will also synchronize the UUIDs for these items to prevent you from having to change references to this in other configuration files. Finally, you have the ability to do a partial export or import so some of these elements can still be considered environment-specific content.

Structure sync provides Drush commands and admin interface screens for synchronizing content that could also be considered configuration. Including menu items, custom blocks and taxonomy terms.

Drush commands

The available Drush commands are:

  • export-taxonomies (et) - Export taxonomy terms to configuration
  • import-taxonomies (it) - Import taxonomy terms from configuration
  • export-blocks (eb) - Export custom blocks to configuration
  • import-blocks (ib) - Import custom blocks from configuration
  • export-menus (em) - Export menu links to configuration
  • import-menus (im) - Import menu links from configuration
  • export-all (ea) - Export taxonomy terms, custom blocks and menu links to configuration
  • import-all (ia) - Import taxonomy terms, custom blocks and menu links from configuration

The access to the admin screens is restricted with the permission to 'administer site configuration'.

Import types

Documentation contributed by willthemoor

Safe

Function to import blocks safely (only adding what isn't already there).

  1. Imports all custom blocks in config unless they already exist the current instance.
  2. Note: If a block was updated and exported to config in a different environment and that block already exists locally, you will not get the updated block content/config.

Full

Function to fully import the custom blocks.
Basically a safe import with update actions for already existing custom blocks.

  1. Deletes any custom blocks not in config.
  2. Imports all custom blocks in config.

Force

Function to import (create) all custom blocks that need to be imported.

  1. Deletes all custom blocks in the system (no checking first).
  2. Creates N new custom blocks based on the config.
Drupal 8–11

Ask your assistant about Structure Sync

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

  • block Drupal core
  • menu_link_content Drupal core
  • taxonomy Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Apr 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
2.0.8 Stable 8–11 Oct 10, 2024
2.0.7 Stable 8–11 PHP >=7.1 Mar 26, 2024
2.0.6 Stable 8–10 PHP >=7.1 Jan 22, 2024
2.0.5 Stable 8–10 PHP >=7.1 Apr 13, 2023