ACTIVE - STAGED Drupal 9 Configuration Management¶
General Logic¶
Configuration management is a fantastic feature of Drupal. The top DX (Drupal Experience) feature of Drupal.
This feature enables us to export config that we make via Drupal Admin interface to version control and deploy it to other Drupal instances. This prevents us to make things more than once like doing in in the local dev, then in dev env and then in prod env, etc. Please also refer to this part of documentation for Drupal 9+ Robust Git Development Workflow.
Exporting Production (Live) Config and Add it to Version Control¶
This is a very important process.
Prior to deploying changes to live, it is crucial to check if there are configuration changes on live that should be exported to code.
To accomplish this use
This will pull live config changes to your local dev environment.
Strictly examine each file and changes.
Also, examine configuration changes on the live site (/admin/config/development/configuration
).
The UI notes are confusing in Drupal 8. So in order to understand the changes please refer to the following:
drupal.org
issue: Explain 'ACTIVE' and 'STAGED' on the sync form
Proposed resolution
Change 'ACTIVE' to 'Current (active in the site)'
Change 'STAGED' to New (can be imported to the site)'
The original proposal, below, was changed because alexpott pointed out #11 that the storage suggested here might not be true.
Change 'ACTIVE' to 'ACTIVE (IN THE DATABASE)'
Change 'STAGED' to 'STAGED (IN THE FILESYSTEM)'
To summarize:
İf you do not pull config from live to dev, the ACTIVE config that has been changed on the live site (meaning it is in the database of live site) will not be exported to code and will be overwritten on the next deploy meaning that the configuration (changes) on the live site will be lost.