Skip to content

Instantly share code, notes, and snippets.

@technology-amazeelabs
Last active June 19, 2019 09:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save technology-amazeelabs/72dd607462ed9c925db31c48f7baac12 to your computer and use it in GitHub Desktop.
Save technology-amazeelabs/72dd607462ed9c925db31c48f7baac12 to your computer and use it in GitHub Desktop.
Drupal 8 local override for Settings and Services files

Add the following two files: settings.local.php and services.local.php to the web/sites/default/ folder within your Drupal 8 project to override settings such as enabling Twig debug and disabling cache.

Depending on the project, you may need to rename the files to local.settings.php and local.services.yml respectively.

parameters:
twig.config:
debug: true
auto_reload: false
cache: false
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
<?php
$config['system.logging']['error_level'] = 'all';
// Disable JS/CSS preprocess.
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
// No caches!
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/default/services.local.yml';
$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment