-
|
How to keep the customized modifications to the file |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
A common pattern is to include your local overrides after the DDEV file, because later values win: if (file_exists(__DIR__ . '/settings.ddev.php') && getenv('IS_DDEV_PROJECT') == 'true') {
include __DIR__ . '/settings.ddev.php';
}
$local_settings = __DIR__ . '/settings.local.php';
if (file_exists($local_settings)) {
include $local_settings;
}Then put your custom settings in If you really want to own If this matches your setup, please mark it answered so people can find the DDEV settings-management placement rule quickly. |
Beta Was this translation helpful? Give feedback.
-
|
You'll want to read the docs on settings files: Especially |
Beta Was this translation helpful? Give feedback.
settings.ddev.phpis a generated file and gets regenerated by DDEV; that is why edits can disappear after restart/recreate. Put persistent Drupal overrides insettings.local.php, or later insettings.php, so they survive environment resets.A common pattern is to include your local overrides after the DDEV file, because later values win:
Then put your custom settings in
settings.local.php.If you really want to own
settings.ddev.phpitself, r…