- 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)
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.
- Follow our documentation to create new directories for these new sites as these directories are not automatically created.
- Install the
config_splitmodule is also recommended, as this provides a useful UI.
- If you want to use profile splits then also make sure to install the Profile Split Module: https://github.com/nedsbeds/profile_split_enable
- To create multiple profiles this is the recommended workaround: https://github.com/nedsbeds/profile_split_enable#multiple-profiles
- 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.
- 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)
This is vital since the module must be enabled before and after you attempt to import your configuration.
Module: … config_filter: 0 config_split: 0 … profile_split_enable: 0 …
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
- Export the configuration, which exports everything into your default directory, including the new config split.
The Drush command will export the configuration definition for the split itself, which is stored in
drush csex [name_of_profile]
This will export the config that is set in the config split yml file (
config_split.config_split.local.ymlfor 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).