---
title: "Acquia Cloud Site Factory: Understanding settings.php file differences"
date: "2024-01-12T02:37:52+00:00"
summary:
image:
type: "article"
url: "/site-factory/help/94691-acquia-cloud-site-factory-understanding-settingsphp-file-differences"
id: "08fade09-6fa6-4d3f-89cf-8db9fecbb570"
---

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](/node/57345)
*   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](/node/57269) documentation.