Move to an inherit-and-override model for settings.php

Created on 6 November 2010, about 14 years ago
Updated 11 February 2024, 9 months ago

One of the problems with upgrading a Drupal site between point releases is if default.settings.php is changed. Users most likely never update their local settings.php and may not know about new features or bug fixes. Especially for new users of Drupal, the only modification from the default settings file is the database connection. My suggestion is that a Drupal /sites directory should look something like this:

default/settings.php
default.settings.php
common.settings.php
  • default.settings.php would be identical in content to what we have, but actually be sourced for configuration. It would be the first file included.
  • common.settings.php as would store settings common to all sites. Core would just ship a file with comments indicating it's purpose. It would be included second, and could override any variable or ini_set() just be redefining it.
  • Finally, default/settings.php would only initially contain settings created by the installer. In most Drupal sites, this would probably end up being the configuration and any private keys.

Thoughts?

✨ Feature request
Status

Closed: works as designed

Version

9.5

Component
BaseΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡¨πŸ‡¦Canada deviantintegral

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024