CMI in Drupal 8 - Configuration Management Initiative

Configuration Management Initiative (CMI) in drupal seperates “content” from "configurations". It uses yml files to store the configuration datas and it provides a way for deploying configurations over the sites which includes development, staging and production. Configuration Management Initiative (CMI) comes in drupal 8 as a part of core. In short Configuration Management Initiative (CMI) in Drupal 8 solved a many big issues that a drupal 7 developer experiences. In a fresh Drupal 8 instance navigate to..

admin->configutation-> configuration synchronization

1.PNG

Where you will find three tabs as "Synchronize", "Import" and "Export".

2.PNG

CMI provides “Full Archive” and “Single Item” export and import of the configurations. "Full Archive" will generate a .tar file where that can be imported into the other one. "Single Item" will generate the code for a specific item. For Example - fields, field storage.

Inorder to import "configuration" between sites their UUID must be identical. If you don't have a clonned instance you can change the UUID of the drupal instance. Once you import, it will take you to "Synchronize" tab where you can view the configuration changes.

Note: For the first time after changing UUID, when you are importing using "Full Archive" all the existing fields will be re-created. Since the fields have a mapping to the UUID. Thus you may lose the existing contents in the website. This is not applicable for clonned instance.

 

Category: