In Drupal, a deployment identifier (also known as deployment_identifier) is a configuration setting that can be added to your settings.php file. It is used to track configuration changes between different environments or deployments, such as from development to staging or production.

The deployment_identifier is useful when you want to ensure that configuration changes are imported during the deployment process. By updating the deployment_identifier value, you can indicate that there are new configuration changes that need to be imported. Drupal will then recognize this change and trigger a configuration import when using configuration management tools, such as Drush or the Configuration Synchronizer module.

To set a deployment identifier in your settings.php file, add the following line:

$settings['deployment_identifier'] = 'YOUR_DEPLOYMENT_IDENTIFIER';

Replace 'YOUR_DEPLOYMENT_IDENTIFIER' with a unique value that represents your deployment. This value can be a string, a timestamp, or even a commit hash from your version control system. You should update this value every time you deploy new configuration changes to ensure they are properly imported.

For example, you can use a timestamp as the deployment identifier:

$settings['deployment_identifier'] = '2023-03-17T12:00:00';

Or, you can use a commit hash from your version control system:

$settings['deployment_identifier'] = 'abc123';

Remember to update the deployment_identifier value whenever you deploy new configuration changes to your environments.


Saved you some valuable time?

Buy me a drink 🍺 to keep me motivated to create free content like this!