-
-
Save zakiya/ac82e27d9d29549b774bed53496fc305 to your computer and use it in GitHub Desktop.
Some settings.php options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Some possible additions to the settings.php file or the settings.local.php file. | |
*/ | |
$databases = ['default' => ['default' => [ | |
'database' => 'db', | |
'username' => 'user', | |
'password' => 'pwd', | |
'host' => 'localhost', | |
'port' => '', | |
'driver' => 'mysql', | |
'prefix' => '', | |
]]]; | |
// Environment Indicator settings. | |
$conf['environment_indicator_overwrite'] = TRUE; | |
$conf['environment_indicator_overwritten_name'] = 'Local'; | |
$conf['environment_indicator_overwritten_color'] = '#707873'; | |
$conf['environment_indicator_overwritten_text_color'] = '#ffffff'; | |
$conf['environment_indicator_overwritten_position'] = 'top'; | |
$conf['environment_indicator_overwritten_fixed'] = FALSE; | |
// Force file paths. | |
$conf['file_public_path'] = 'sites/default/files'; | |
$conf['file_private_path'] = 'sites/default/files/private'; | |
$conf['file_temporary_path'] = '/tmp'; | |
// Turn off js and css aggregation. | |
$conf['preprocess_css'] = FALSE; | |
$conf['preprocess_js'] = FALSE; | |
// Turn off js and css aggregation in Drupal 8. | |
$config['system.performance']['css']['preprocess'] = FALSE; | |
$config['system.performance']['js']['preprocess'] = FALSE; | |
// Make sure you have lots of memory. | |
ini_set('memory_limit','500M'); | |
// Some things take a really long time. | |
set_time_limit ( 1000 ); | |
// Show all errors. | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
// Log mail instead of sending (Requires the devel module). | |
$conf['mail_system'] = array( | |
'default-system' => 'DevelMailLog', | |
); | |
// User development serices. | |
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml'; | |
// Disables render cache. | |
$settings['cache']['bins']['render'] = 'cache.backend.null'; | |
// Allow local site. | |
$settings['trusted_host_patterns'] = ['example.local']; | |
// Set the hash salt. | |
$settings['hash_salt'] = '¯\_(ツ)_/¯'; | |
/** | |
* Include a local settings file if it exists. | |
*/ | |
$local_settings = dirname(__FILE__) . '/settings.local.php'; | |
if (file_exists($local_settings)) { | |
include $local_settings; | |
} | |
/** | |
* Disable secure pages for local development. | |
*/ | |
$conf['securepages_enable'] = 0; | |
/** | |
* Disable shield for local development. | |
*/ | |
$conf['shield_user'] = ''; | |
/** | |
* Log local mail instead of sending it. | |
* | |
* Use `\Drupal::state()->get('system.test_mail_collector');` to get the mail log. | |
*/ | |
$config['system.mail']['interface']['default'] = 'test_mail_collector'; | |
// disable cron (D7): | |
$conf['cron_safe_threshold'] = 0; | |
// Disable cron in settings.php for D8. | |
$config['automated_cron.settings']['interval'] = 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment