PHPackages                             operations/drupal-settings - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. operations/drupal-settings

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

operations/drupal-settings
==========================

Automatic Drupal Settings.

2.1.0(2y ago)01.3k[1 issues](https://github.com/operations-project/drupal-settings/issues)GPL-2.0-or-laterPHP

Since Jul 25Pushed 1y agoCompare

[ Source](https://github.com/operations-project/drupal-settings)[ Packagist](https://packagist.org/packages/operations/drupal-settings)[ Docs](https://drupal.org/project/operations)[ Fund](https://thinkdrop.net)[ GitHub Sponsors](https://github.com/jonpugh)[ RSS](/packages/operations-drupal-settings/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelogDependenciesVersions (30)Used By (0)

Drupal Settings
===============

[](#drupal-settings)

This PHP Package is a smart include for Drupal settings.php.

Add it to your project to simplify your settings.php file by using common defaults for each hosting vendor and environment types.

It just makes things easier. For example, when using Lando, you don't have to set the database settings or DRUSH\_OPTIONS\_URI, and it automatically enables development mode.

Usage
-----

[](#usage)

1. Install with composer:

    ```
    composer require operations/drupal-settings`

    ```
2. Add snippet to sites/default/settings.php:

    ```
    if (file_exists(DRUPAL_ROOT . "/../vendor/operations/drupal-settings/Settings/settings.include.php")) {
        require DRUPAL_ROOT . "/../vendor/operations/drupal-settings/Settings/settings.include.php";
    }

    ```
3. Profit.

To override any defaults provided by [`settings.include.php`](./Settings/settings.include.php), simply add them to your settings.php file after the snippet.

Components
----------

[](#components)

1. [Drupal Settings Include File](./Settings/settings.include.php) - settings.include.php

    Include this file from settings.php and remove all the extra settings. For full documentation on what it does, see the file [./Settings/settings.include.php](./Settings/settings.include.php).
2. [Vendor-specific settings files](./Settings/Vendors) - Included automatically when their environment variables are detected.
3. [Composer Autoload File](./Settings/autoload.php) - autoload.php

    This file is included in your site's Autoloader as early as possible.

    It is used to set Environment variables like DRUSH\_OPTIONS\_URI automatically.

Features
--------

[](#features)

This tool attempts to automate as much configuration as possible for multiple host providers.

The main features are:

1. Detect host vendor environments and includes `settings.VENDOR.php` files automatically.
2. Sets `$databases` credentials from host vendor information, or uses `MYSQL_USER`-style variables.
3. Sets `DRUSH_OPTIONS_URI` globally so any call to drush has the correct URL.
4. Sets `DRUPAL_ENV` environment variable to `prod` when a production environment is detected. (Defaults to `dev`).
5. Includes environment specific `settings.DRUPAL_ENV.php` files from this project and `sites/default/settings.DRUPAL_ENV.php` from your site's source code if it exists.
6. Automatically enables development features when `DRUPAL_ENV==dev` by including Drupal's `example.settings.local.php`.

Supported Providers
-------------------

[](#supported-providers)

1. Lando
2. DDEV
3. Platform.sh
4. Acquia
5. OpenDevShop

We invite all other systems to submit merge requests to the project here:

Development
-----------

[](#development)

This tool is a part of the [Drupal Operations / OX project](https://drupal.org/project/ox). The code is maintained in the monorepo "ox".

See  for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~33 days

Total

25

Last Release

844d ago

Major Versions

1.10.0-alpha11 → 2.0.0-beta32023-08-09

1.x-dev → 2.x-dev2024-01-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/10539fb9e887c35b626eba70c97dd9d53ba14e987d4f129b55a488664a834eca?d=identicon)[jonpugh](/maintainers/jonpugh)

---

Top Contributors

[![jonpugh](https://avatars.githubusercontent.com/u/106420?v=4)](https://github.com/jonpugh "jonpugh (9 commits)")

### Embed Badge

![Health badge](/badges/operations-drupal-settings/health.svg)

```
[![Health](https://phpackages.com/badges/operations-drupal-settings/health.svg)](https://phpackages.com/packages/operations-drupal-settings)
```

###  Alternatives

[dg/composer-frontline

Composer Frontline: updates all the version constraints in the composer.json file to latest version

288.4k1](/packages/dg-composer-frontline)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
