A minimal Drupal settings.php
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 | |
// | |
// Basic Drupal settings.php | |
// (As I use it for development) | |
// | |
// | |
// Database settings | |
// | |
$databases = array ( | |
'default' => | |
array ( | |
'default' => | |
array ( | |
'database' => 'my-database', | |
'username' => 'db-user', | |
'password' => 'secret', | |
'host' => 'localhost', | |
'driver' => 'mysql', # or 'pgsql' | |
), | |
), | |
); | |
// | |
// Adopt PHP Session handling as proposed by the stock settings.php of Drupal | |
// | |
ini_set('session.gc_probability', 1); | |
ini_set('session.gc_divisor', 100); | |
ini_set('session.gc_maxlifetime', 200000); | |
ini_set('session.cookie_lifetime', 2000000); | |
// Disable access to update.php without prior log in. | |
$update_free_access = FALSE; | |
// Salt for password generation. | |
// You might use http://www.random.org/strings/ to generate some string... | |
$drupal_hash_salt = 'SomeRandomValue-UniqueForEachDrupalInstallation'; | |
// | |
// Do fast-404s for common resources of 404s | |
// | |
$conf['404_fast_paths_exclude'] = '/\/(?:styles)\//'; | |
$conf['404_fast_paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; | |
$conf['404_fast_html'] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>'; | |
// Super-load fast-404s - uncomment if you know what you are doing: | |
# drupal_fast_404(); | |
// | |
// Drupal settings. | |
// Here we override stuff which may be set by Drupal core or contrib-modules through the Web-UI. | |
// Remember: What ever variable we set here is "locked" and can't be modified through the Web-UI anymore. | |
// @see variable_get() | |
// | |
// Disable CSS and JS aggregation (good for development setups) | |
$conf['preprocess_css'] = FALSE; | |
$conf['preprocess_js'] = FALSE; | |
$conf['css_gzip_compression'] = FALSE; | |
$conf['js_gzip_compression'] = FALSE; | |
// Define path for public & private files of drupal | |
$conf['file_public_path'] = 'sites/default/files'; | |
//$conf['file_private_path'] = '/somewhere/out/of/webservers/docroot'; | |
// Set the temporary files path - if default setup of PHP (php.ini) is not good | |
//$conf['file_temporary_path'] = '/tmp'; | |
// Disable poormans cron, if cron.php gets called from some real cron system | |
//$conf['cron_safe_threshold'] = 0; | |
// | |
// Module specific settings | |
// These settings will not interfere anything if the module is not installed. | |
// So it's okay to pull them in even if the modules are not used in a Drupal setup. | |
// | |
// The settings are tuned for development purposes. Therefore they most likely prevent | |
// or disable use of thrid party services which could lead to unwanted "live events" during | |
// development. | |
// | |
// Override settings for the environment_indicator module | |
// https://www.drupal.org/project/environment_indicator | |
$conf['environment_indicator_overwrite'] = TRUE; | |
$conf['environment_indicator_overwritten_name'] = 'Develop'; | |
$conf['environment_indicator_overwritten_color'] = '#32990a'; | |
$conf['environment_indicator_overwritten_text_color'] = '#ffffff'; | |
$conf['environment_indicator_overwritten_position'] = 'top'; | |
// Set target for loading images and files for another Drupal instance | |
// *Update this URL to your project live or staging address!* | |
$conf['stage_file_proxy_origin'] = 'http://www.cyledge.com'; | |
// Disable Google Analytics | |
$conf['googleanalytics_account'] = 'UA-XXXXXXX-X'; | |
// Disable Mailchimp API usage | |
$conf['mailchimp_api_key'] = "xxx"; | |
// Disable Mandrill Mail API sending | |
$conf['mandrill_disabled'] = TRUE; | |
// Enable Mandrill module's Debug mode (which redircts all mails to the site wide | |
// mail-address instead of the specific recipients) | |
// This directive will only take effect if 'mandrill_disabled' is set to FALSE! | |
$conf['mandrill_debug'] = TRUE; | |
// Run Stripe API in test-mode | |
$conf['stripe_key_status'] = 'test'; | |
// | |
// Module 'variable' kills my settings.php!! | |
// If you use the variables module and translate values the whole thing | |
// with putting variables into $conf[] of settings.php becomes useless. | |
// Until now I haven't found a workaround - please tell me if you have one.. | |
// | |
// |
added more module specific overrides
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
added environment_indicator overwrite settings