Loading...


Related Products


Date Published: January 12, 2024

Acquia Cloud Site Factory: Understanding settings.php file differences

It is important to understand the layers of execution of various settings files used on Site Factory sites despite customers not having direct access to modify these files.

For example, let's look at the differences between /sites/default/settings.php and /sites/g/settings.php.

/sites/default/settings.php

The following file /sites/default/settings.php is only executed when no site is found for a domain.

Other key concepts:

  • Includes references to various *.settings.php files (* = files, cron, dev, testing, etc.)
  • Settings configuration in this file, as well as the *.settings.php files are all duplicated in either pre or post cloud hook settings.php files
  • Does not get run on Acquia Cloud Site Factory, as all settings configuration is handled by sites/g/settings.php and cloud-hooks

/sites/g/settings.php

The file /sites/g/settings.php is not allowed to be changed.

Key concepts:

  • Added via initialization of the acsf module
  • Invokes pre/post cloud hooks
  • Includes site-specific settings file that is not in the code repository, but hosted separately on Acquia Cloud Site Factory
  • Immutable. All changes to this file should come via the acsf-init drush command. More information about acsf-init can be found at Using your own Drupal distribution
  • Additional settings should be added via the respective pre/post factory hook settings files

Factory hooks are used to perform various website actions that occur during runtime, or to perform code execution after runtime events. More information about using Factory hooks can be found in our Hooks in Site Factory documentation.

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