Skip to content
Discussion options

You must be logged in to vote

settings.ddev.php is a generated file and gets regenerated by DDEV; that is why edits can disappear after restart/recreate. Put persistent Drupal overrides in settings.local.php, or later in settings.php, so they survive environment resets.

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 settings.local.php.

If you really want to own settings.ddev.php itself, r…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rfay
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants