Skip to content

Instantly share code, notes, and snippets.

@cristiroma
Created October 24, 2024 07:26
Show Gist options
  • Save cristiroma/6b8b0b4b411c5206a95d693dbe924dbd to your computer and use it in GitHub Desktop.
Save cristiroma/6b8b0b4b411c5206a95d693dbe924dbd to your computer and use it in GitHub Desktop.
Various settings for Drupal settings.local.php
<?php
// phpcs:ignoreFile
/** Enable local development services. */
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
/** Show all error messages, with backtrace information. */
$config['system.logging']['error_level'] = 'verbose';
/** Disable CSS and JS aggregation. */
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
/** Disable the render cache. */
# $settings['cache']['bins']['render'] = 'cache.backend.null';
/** Disable caching for migrations. */
# $settings['cache']['bins']['discovery_migration'] = 'cache.backend.memory';
/** Disable Internal Page Cache. */
# $settings['cache']['bins']['page'] = 'cache.backend.null';
/** Disable Dynamic Page Cache. */
# $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
/** Allow test modules and themes to be installed. */
# $settings['extension_discovery_scan_tests'] = TRUE;
/** Enable access to rebuild.php. */
$settings['rebuild_access'] = FALSE;
/** Skip file system permissions hardening. */
$settings['skip_permissions_hardening'] = TRUE;
/** Exclude modules from configuration synchronization. */
# $settings['config_exclude_modules'] = ['devel', 'stage_file_proxy'];
/** Exclude these modules from config export/import. */
$settings['config_exclude_modules'] = ['devel', 'stage_file_proxy'];
/** Drupal Hash salt. */
$settings['hash_salt'] = 'YOUR-HASH-SALT-HERE';
/** Database default connection */
$databases['default']['default'] = [
'init_commands' => ['isolation' => "SET SESSION tx_isolation='READ-COMMITTED'"],
'database' => '<DATABASE>',
'username' => 'root',
'password' => 'root',
'prefix' => '',
'host' => '127.0.0.1',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
];
/** Configure smtp module. */
$config['smtp.settings']['smtp_username'] = '[email protected]';
$config['smtp.settings']['smtp_from'] = '[email protected]';
$config['smtp.settings']['smtp_fromname'] = 'test';
$config['smtp.settings']['smtp_host'] = '127.0.0.1';
$config['smtp.settings']['smtp_port'] = '25';
$config['smtp.settings']['smtp_protocol'] = 'standard';
$config['smtp.settings']['smtp_password'] = '';
/** Disable advagg cache. */
$config['advagg.settings']['enabled'] = FALSE;
/** Configure stage_file_proxy. */
$config['stage_file_proxy.settings']['origin'] = 'https://prodsite.com/';
$config['stage_file_proxy.settings']['use_imagecache_root'] = FALSE;
/** search_api Apache Solr configuration
$config['search_api.server.solr']['backend_config']['connector_config']['core'] = '<CORE_NAME>';
$config['search_api.server.solr']['backend_config']['connector_config']['port'] = '8983';
/** private:// filesystem */
$settings['file_private_path'] = '../files-private';
/** Sentry integration (disabled for local development). */
$config['raven.settings']['client_key'] = '';
$config['raven.settings']['public_dsn'] = '';
$config['raven.settings']['environment'] = 'dev';
$settings['environment'] = 'dev';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment