Thumbnail

Example of settings.php for Drupal 8

Thumbnail

Si Hobbs

|

This article describes a way to manage your settings.php related files. It considers common aspects like local/prod hosting, minimal on-boarding, and sensible defaults.

In a Gist I've captured a typical settings.php setup that is used when we set up a new site at Lil Engine. In future articles I will look at specific techniques that extend on this example.

You'll notice that it assumes Platform.sh hosting and Lando local dev, while being very explicit which setup is being used. This is because we work with a variety of vendors, teams and hosting platforms.

The basic structure is:

- settings.php
- includes/
--- default.settings.php
--- default.services.yml
--- lando.settings.php
--- lando.services.yml
--- local.settings.php (optional, not in Git)
--- local.service.yml (optional, not in Git)
--- platform.settings.php

And the Gist: https://gist.github.com/simesy/9a628655983ea42c34b321f705b0990b

 

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Comments

  • Allowed HTML tags: <em> <strong> <cite> <blockquote cite> <ul type> <ol start type> <li> <dl> <dt> <dd> <p>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
  • Use [gist:#####] where ##### is your gist number to embed the gist
    You may also include a specific file within a multi-file gist with [gist:####:my_file].

Spread the word