Skip to content

Instantly share code, notes, and snippets.

@simesy
Last active December 11, 2019 07:37
Show Gist options
  • Save simesy/13b01259316f351e180f36cceeeb128a to your computer and use it in GitHub Desktop.
Save simesy/13b01259316f351e180f36cceeeb128a to your computer and use it in GitHub Desktop.
local dev settings for drupal
These are not prod safe settings. Performance is not suitable for
general use.
Security or heavy performance things are commented out. You may want to
enable them manually.
To use, place these files in your sites/default/settings.php
should include the local.settings.php (if it exists). Then exclude
local.settings.* files in your .gitignore.
Thanks @dpi.
parameters:
http.response.debug_cacheability_headers: true
twig.config:
debug: true
auto_reload: true
cache: false
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
<?php
$domain = 'localhost'; // Update to match local development domain.
// Uncomment these to keep twig out of cache.
// $settings['cache']['bins']['render'] = 'cache.backend.null';
// $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
$settings['cache']['bins']['page'] = 'cache.backend.null';
$settings['container_yamls'][] = __DIR__ . '/local.services.yml';
$settings['extension_discovery_scan_tests'] = TRUE;
$settings['rebuild_access'] = TRUE;
$settings['trusted_host_patterns'][] = '^[a-z\-0-9]{1,32}\.' . $domain . '$'; // '^.+$';
$settings['skip_permissions_hardening'] = TRUE;
// $settings['update_free_access'] = TRUE;
$config['field_ui.settings']['field_prefix'] = 'field_'; // Default.
$config['shield.settings']['credentials']['shield']['user'] = NULL;
$config['system.logging']['error_level'] = 'verbose';
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
$config['views.settings']['skip_cache'] = TRUE;
$config['views.settings']['ui']['show']['sql_query']['enabled'] = TRUE;
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
ini_set('display_errors', 1);
ini_set('memory_limit','256M');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment