Skip to content

Instantly share code, notes, and snippets.

@frankyonnetti
Last active February 17, 2021 00:47
Show Gist options
  • Select an option

  • Save frankyonnetti/2862a432cd1d1398b55109f4aab6f3d3 to your computer and use it in GitHub Desktop.

Select an option

Save frankyonnetti/2862a432cd1d1398b55109f4aab6f3d3 to your computer and use it in GitHub Desktop.
Drupal 7 - local settings #drupal #d7 #settings
//Override default local database settings
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'database_local',
'username' => 'root',
'password' => 'root',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
),
);
// Set base URL
$base_url = 'http://local.example.com';
// Stage file proxy
$conf['stage_file_proxy_origin'] = 'http://www.example.com'; // no trailing slash
$conf['stage_file_proxy_origin'] = 'http://user:password@www.example.com'; // no trailing slash
// Reroute email
$conf['reroute_email_enable'] = 1;
$conf['reroute_email_address'] = "frank@designhammer.com";
$conf['reroute_email_enable_message'] = 1;
// Environment indicator
$conf['environment_indicator_overwrite'] = TRUE;
$conf['environment_indicator_overwritten_name'] = 'Local';
// $conf['environment_indicator_overwritten_name'] = 'Development';
// $conf['environment_indicator_overwritten_name'] = 'Production';
$conf['environment_indicator_overwritten_color'] = '#409add'; // blue local
// $conf['environment_indicator_overwritten_color'] = '#689f38'; // green dev
// $conf['environment_indicator_overwritten_color'] = '#e04610'; // red prod
$conf['environment_indicator_overwritten_text_color'] = '#ffffff';
// Set media file path
$conf['file_public_path'] = ''; // optional
$conf['file_private_path'] = '/Users/frankyonnetti/Sites/dh-git/WEBSITE/files-private';
$conf['file_temporary_path'] = '/tmp';
// Backup & Migrate: Don't run backups via cron.
$conf['backup_migrate_disable_cron'] = true;
// Disable all cache for local development
$conf['cache'] = 0;
$conf['block_cache'] = 0;
$conf['cache_lifetime'] = 0;
$conf['page_cache_maximum_age'] = 0;
$conf['preprocess_css'] = 0;
$conf['preprocess_js'] = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment