An Example Drupal Local.Settings.php File

Last modified: 
Thursday, September 24th, 2015
Topics: 
Drupal7
$env = getenv('APP_ENV');
switch ($env) {
  case 'LOCAL':
  default:
  ini_set('display_errors', 1);
  ini_set('memory_limit','512M');
  $base_url = 'http://local.sittinginoblivion.com';  // NO trailing slash!
  $update_free_access = TRUE;

  $databases = array (
    'default' =>
      array (
        'default' =>
          array (
            'database' => 'mydatabase',
            'username' => 'root',
            'password' => 'root',
            'host' => 'localhost',
            'port' => '',
            'driver' => 'mysql',
            'prefix' => '',
          ),
      ),
  );
  $conf['file_private_path'] = DRUPAL_ROOT.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'private';
  $conf['file_temporary_path'] = DRUPAL_ROOT.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'tmp';
  $conf['file_public_path'] = 'sites'.DIRECTORY_SEPARATOR.'default'.DIRECTORY_SEPARATOR.'files';

  // Environment Indicator colors
  $conf['environment_indicator_overwrite'] = TRUE;
  $conf['environment_indicator_overwritten_name'] = 'LOCAL';
  $conf['environment_indicator_overwritten_color'] = '#161a84';
  $conf['environment_indicator_overwritten_text_color'] = '#ffffff';
  $conf['environment_indicator_overwritten_position'] = 'top';
  $conf['environment_indicator_overwritten_fixed'] = FALSE;
  break;
}


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.