Configure a Drupal 10 codebase with Acquia CMS and Site Studio for Site Factory: Part 1

  • Last updated
  • 1 minute read


Create a new Cloud IDE instance, Install Drupal 10, and prepare your codebase with the necessary modules for Acquia CMS, Site Studio and Site Factory.


In this comprehensive, five-part guide, I will show how to set up Cloud IDE, install Drupal 10 with Acquia CMS and Site Studio, and finally prepare your codebase for Site Factory by giving it a custom installation profile. We will leverage Acquia BLT helper scripts and recipes to standardize and accelerate what would otherwise be a lengthier sequence of manual steps.

The approach covered here will enable you to install new Drupal sites on ACSF using the current configuration files in your codebase.

  1. Set up Cloud IDE, Install Drupal 10, and Prepare your Codebase for Site Factory
  2. Acquia CMS and Site Studio installation and configuration for Site Factory
  3. Create a Custom Profile and test New Site Creation with Site Factory
  4. ACSF Deployment Workflow with Site Studio
  5. Optional: Configure multiple Site Studio sync directories

Let's get started!

  1. Create your Cloud IDE instance

    Login to your Acquia Cloud Platform account:

    Front page of the Acquia TAM 2 Cloud Platform account.

    Click the “Actions” button and select “Create Cloud IDE”. Give a name to your new Cloud IDE instance and click the “Submit” button:

    Give a name to your new Cloud IDE instance and click the “Submit” button.

    We want to install Drupal 10, so we need to make sure that the PHP version of our environments is set to PHP 8.1:

    Make sure that the PHP version of our environments is set to PHP 8.1.


  2. Cloud IDE Configuration

    Open your Cloud IDE instance:

    Open your Cloud IDE instance.
    Cloud IDE showing the Get Started page.

    Ensure that the PHP version of your Cloud IDE is also configured to PHP 8.1:

    php -v     
    PHP 8.1.7 (cli) (built: Jul  6 2022 11:02:45) (NTS)     
    Copyright (c) The PHP Group     
    Zend Engine v4.1.7-dev, Copyright (c) Zend Technologies     
       with Zend OPcache v8.1.7, Copyright (c), by Zend Technologies

    If you are currently using an older version of PHP in your Cloud IDE instance, you can easily switch to a newer version with the following command:

    acli ide:php-version 8.1

    On the “Get Started” page of your Cloud IDE, click the “Configure IDE” button to connect your IDE to your Cloud Platform account:

    Screenshot showing the location of the Configure IDE button.
  3. Create a new Drupal project

    The Acquia Drupal Recommended Project is a project template providing a great out-of-the-box experience for new Drupal 10 projects hosted on Acquia. It is based on the Drupal Recommended Project, with the principal difference being the addition of several modules and packages that provide the best possible out-of-the-box experience for Acquia customers.

    For this tutorial, We will use the 2.0.210 release of the Acquia Drupal Recommended Project:

    Open a new Terminal window in your Cloud IDE and execute the following composer command:

    composer create-project acquia/drupal-recommended-project:2.0.210 . 

    Once the process has finished, you can check the current status of your Drupal project:

    Signorelli IDE:~/project $ drush status
    Drupal version : 10.2.3                                                       
    Site URI       : 
    PHP binary     : /usr/local/php8.1/bin/php                                    
    PHP config     : /usr/local/php8.1/etc/cli/php.ini                            
    PHP OS         : Linux                                                        
    PHP version    : 8.1.24                                                       
    Drush script   : /home/ide/project/vendor/bin/drush                           
    Drush version  :                                                     
    Drush temp     : /tmp                                                         
    Drush configs  : /home/ide/.drush/drush.yml                                   
    Drupal root    : /home/ide/project/docroot                                    
    Site path      : sites/default
    Signorelli IDE:~/project $
  4. Install BLT

    To add BLT to your existing Drupal project, please follow these steps:

    1. Open the Cloud IDE Terminal and navigate to your project directory (~/project).
    2. Once you're in the correct directory, you can configure Composer's minimum-stability and prefer-stable values by running:
    composer config minimum-stability dev
    composer config prefer-stable true

    These commands ensure the best stability for your project and allow BLT to be added successfully.

    Install BLT with the following composer command:

    composer require acquia/blt:^13.7
    Installing BLT


  5. Install Acquia BLT ACSF

    This plugin provides a set of commands in the recipes:acsf namespace that use the ACSF Drupal module to initialize your ACSF site. More information can be found here:

    To install Acquia BLT ACSF, execute the following command:

    composer require acquia/blt-acsf

    Configure the Site Factory Connector module in your codebase using BLT:

    blt recipes:acsf:init:all

    Download and extract the updated Acquia Cloud Site Factory Connector:

    blt recipes:acsf:init:drush
    Download the updated ACSF Connector
  6. Install the Acquia Cloud Site Factory Connector module

    Run the following command to install the ACSF module:

    composer require 'drupal/acsf:^2.73'
  7. Install the Config Split and Config Filter modules

    Install the Configuration Split module:

    composer require 'drupal/config_split:^2.0'

    Install the Config Filter module:

    composer require 'drupal/config_filter:^2.6'
  8. Configure the Site Studio Sync directory

    Before you execute the Site Studio configuration export command, it’s necessary to configure the Site Studio sync directory. More information can be found here:

    Create the site_studio.settings.php file

    Navigate to the docroot/sites/settings/ folder:

    cd docroot/sites/settings

    Create a new PHP script named site_studio.settings.php and add the following code:

    * Define the Cohesion sync directory.
    $settings['site_studio_sync'] = '../config/site_studio_sync';
    $settings['site_studio_package_multiline'] = TRUE;
    Create the site_studio.settings.php file


    Create the global.settings.php file

    Navigate to the docroot/sites/settings folder:

    cd /home/ide/project/docroot/sites/settings

    Create a new PHP script named global.settings.php and add the following code:

    * @file
    * Generated by BLT. Serves as an example of global includes.
    * An example global include file.
    * To use this file, copy and rename to global.settings.php.
    * Include settings files in docroot/sites/settings.
    * If instead you want to add settings to a specific site, see BLT's includes
    * file in docroot/sites/{site-name}/settings/default.includes.settings.php.
    $additionalSettingsFiles = [
     // e.g,( DRUPAL_ROOT . "/sites/settings/foo.settings.php" )
     DRUPAL_ROOT . "/sites/settings/site_studio.settings.php"
    ];foreach ($additionalSettingsFiles as $settingsFile) {
     if (file_exists($settingsFile)) {
       // phpcs:ignore
       require $settingsFile;
    Create the global.settings.php file

    Create the site_studio_sync folder inside your config folder and then navigate back to the project folder:

    cd /home/ide/project/config
    mkdir site_studio_sync
    cd /home/ide/project/
  9. Edit your blt/blt.yml file

    To edit your blt/blt.yml file, you will need to find out the ID of your application and the URL of your Acquia repository.

    Go to your Acquia Platform account and click the “Product Keys” option from the left menu, your Application ID is listed under Username and Application UUID:

    Your Application ID is listed under Username and Application UUID

    To find out the URL of your Acquia repository, go to your Acquia Platform account and click the “Actions” button to reveal the dropdown and select “View Git information”:

    View Git information
    Git Information

    Edit your blt/blt.yml and replace its content with the following code:

     machine_name: tamacsf
     appId: 48efba74-75af-43ef-8455-32e6f043c375
     default_branch: master
       cloud: '[email protected]:acquiatam2.git'
     tag_source: true
       remote: site1.01test
       local: self
       ci: self
     default_alias: '${drush.aliases.local}'

    Replace the following keys:

    • machine_name: YOUR_MACHINE_NAME (Example: tamacsf)
    • cloud:
      • appId: YOUR_APP_ID (Example: 48efba74-75af-43ef-8455-32e6f043c375)
    • git:
  10. Install the blt-site-studio plugin

    This plugin is designed specifically for Acquia BLT and serves the purpose of integrating Acquia Site Studio. Its main function is to incorporate the essential Site Studio commands into the "blt setup" command, enabling automated configuration setup and deployment for Site Studio.

    This plugin automates the necessary Site Studio drush commands into “blt setup” to do the following:

    • Import Site Studio assets and configuration from the package file.
    • Import Site studio configuration from the sync folder.
    • Rebuild Site Studio.

    Add the following to the repositories section of your composer.json file:

    "blt-site-studio": {
       "type": "vcs",
       "url": "",
       "no-api": true

    Or execute the following composer command:

    composer config repositories.blt-site-studio '{"type": "vcs", "url": "", "no-api": true}'

    Require the plugin with composer:

    composer require acquia/blt-site-studio

Congratulations on completing the initial phase of this five-step guide! You have navigated through the process of creating a new ACSF Drupal 10 codebase that is configured for Acquia CMS and Site Studio. Now, let's head to the next phase where you will learn how to install Acquia CMS and configure Site Studio.

Next phase: Acquia CMS and Site Studio installation and configuration for Site Factory