---
title: "Configuration management and deployment"
date: "2022-04-05T14:40:28+00:00"
summary: "Streamline your Site Studio development with our guide to configuration management and deployment. Learn to effectively use package management for smoother workflows and seamless site updates."
image:
type: "page"
url: "/drupal-starter-kits/add-ons/site-studio/configuration-management-and-deployment"
id: "c0684a4a-4783-4bb9-abe9-762e19aebad8"
---

When developing with Site Studio, you will create configuration entities that should be managed using Site Studio's Package management system. Please refer to the following sub-sections of this user guide for clarification on how this differs from Drupal's core configuration workflow as well as detailed explanations on how to export and import/deploy your packages.

Protecting Site Studio credentials
----------------------------------

You must not store sensitive Site Studio credentials solely in the database. Manage credentials through environment variables in the `settings.php` file:

    // settings.php
    $config['cohesion.settings']['api_key'] = getenv('SITE_STUDIO_API_KEY');
    $config['cohesion.settings']['agency_key'] = getenv('SITE_STUDIO_AGENCY_KEY');

Site Studio does not automatically inject these environment variables. You must configure them for each environment. For instructions on how to set up these variables, visit [Creating custom environment variables](/acquia-cloud-platform/creating-custom-environment-variables "Creating custom environment variables").

This approach ensures the following benefits:

*   Credentials survive deployment configuration synchronizations.
    
*   Version control does not include credentials.
    
*   Each environment can use its own set of keys.
    

Warning

If `config_ignore` does not protect `cohesion.settings` and you do not override credentials in the `settings.php` file, a deployment synchronization can delete your Site Studio API keys. This issue causes rebuild failures and potential downtime.