Loading...


Related Products


Date Published: February 5, 2025

How to enable Config Split

Important Note

Site Splits are only supported on Acquia Cloud Site Factory when using BLT (and not currently supported on Acquia Cloud or Acquia Pipelines, when using BLT). Site splits are not useful for projects not using multisite Drupal 8.

Recommendations:

  • If going with profile splits, (or really any splits) you should consider how much of your platform can be shared across the splits (this is the default config). We would suggest you try to aim for at least 75-80%.
  • We also recommend trying to keep profile splits to 3-5 total.

Certainly, ACSF and D8 multisite can technically support an infinite number but the more diverse the platform becomes the harder it is to rapidly test and deploy updates (or new features).

Also, if you have common config, and more than 5 profiles, at a certain point you are doing "drastically" different things with your platform (which also gets more dangerous, and harder to maintain)

Important Note

If you are not using BLT, please implement this workaround for the "vcs" directory.

Here is a basic outline of how to implement this functionality. This is not specific and will need to be updated or modified for your use-case.

  1. Follow our documentation to create new directories for these new sites as these directories are not automatically created.
  2. Install the config_filter module.
  3. The config_split module is also recommended, as this provides a useful UI.
  4. If you want to use profile splits then also make sure to install the Profile Split Module: https://github.com/nedsbeds/profile_split_enable.
    1. To create multiple profiles this is the recommended workaround: https://github.com/nedsbeds/profile_split_enable#multiple-profiles.
    2. After the first installation of Drupal with your base profile, enable the config_split module and create splits for each of your profiles. The machine name of the split should match the machine name of your profile.
    3. For this module to function, you MUST add it as a dependency of your profile, and then ensure it is also enabled in config (i.e. your core.extenstion file).
      Module:
          …
          config_filter: 0
          config_split: 0
          …
          profile_split_enable: 0
          …
      This is vital since the module must be enabled before and after you attempt to import your configuration.
    4. example_profile/example_profile.info.yml
      
      name: 'Example Profile'
      type: profile
      description: 'Example lightning sub profile.'
      version: 1.0.0
      base profile: lightning
      core: 8.x
      dependencies:
        - profile_split_enable
  5. Export the configuration, which exports everything into your default directory, including the new config split.
    drush config-export
    The Drush command will export the configuration definition for the split itself, which is stored in example_profile/example_profile.info.yml.
  6. drush csex [name_of_profile]
    This will export the config that is set in the config split yml file (config_split.config_split.local.yml for example) and then dump the config used into the directory made during step 1 (example ../config/profile/example_profile).

Note for Site Factory and BLT customers: For existing codebases make sure to include an update hook that will run on all existing sites during deployments to enable the profile_split_enable module (remember, BLT executes database updates prior to importing configuration, so this will effectively ensure that config imports do not fail as the module will already be on when the config is imported).

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation
Back to Site navigation