Configuration Woes

Drupal 8 : Reasons why CMI has answers to all your Configuration Woes

The Configuration Management Initiative (CMI) has turned out to be quite a game changer for how the configuration settings will be managed and staged between different environments in Drupal 8. A Configuration Management System facilitates an ease of movement between the development, staging and production environments within a Drupal installation while minimizing the need to add extra modules.

In short the Configuration Management Initiative in Drupal 8 is set to solve some long-standing issues a Drupal 7 developer has been grappling with.

# A Unified Approach towards Configuration - Storage of Configuration as Files

An irksome issue with Drupal 7 is the different sets of standards followed by the modules in storing configuration. This often results in the configuration being scattered among database tables, variables and objects exported via CTools and Features, making it hard to detect where the relevant configuration is stored.The Configuration Management Initiative in Drupal 8 has taken care of all the hitches relating to the storage of configuration. The configuration will be stored in the form of human readable text files in the YAML (.yml) format.

# Improved Configuration Staging Capabilities

The Drupal 7 version relied on the Features module and the Features revert operation to have “staged Configuration”. The “import configuration” option available in Drupal 8 will let you import a single configuration file or even the entire site configuration with effortless ease. Although Drupal 7 offers better packaging capabilities, Drupal 8 outscores it with its “importing configuration option” which again is totally unfeasible with Drupal 7 features.

A version control system in Drupal 8 lets you keep track of your configuration changes.The import, export and synchronization of configuration on a site can be done via Manage > Configuration > Development > Configuration management (admin/config/development/configuration).

# Where are the Configurations Stored?

The new configuration system uses two directories to store configuration, the active and the staging directories. When settings are modified by a site administrator, the changes are stored in the active configuration in the database and can be exported back to the files when needed. When a module is enabled, the default settings are copied to the active configuration in the database. The default settings of Modules are stored in configuration files that are stored in config/install/directory in the module root directory.

Although the introduction of configuration management initiative in Drupal 8 is meant to streamline the configuration management, it does not leave the Features module irrelevant. A 3.x version of Features will be integrated with the new Configuration Management System to provide options like “export bundled functionality”.

Valuebound is committed to growth of Drupal & community. We will be publishing more about benefits of Drupal 8 and how your business can make best use of new features. Feel free to reach out to us if you would like know more about our contribution towards Drupal.