Skip to content

Instantly share code, notes, and snippets.

@delphian
Created August 15, 2013 17:12
Show Gist options
  • Save delphian/6242622 to your computer and use it in GitHub Desktop.
Save delphian/6242622 to your computer and use it in GitHub Desktop.
Example of drupal 7 local settings.php file.
<?php
// To set up a local environment, make a duplicate of this file and name it
// local-settings.inc in the site directory that contains the settings.php file.
// Ignore sites/*/local-settings.php in the .gitignore file. Change the settings.php
// file to include local-settings.php if the file exists.
// Point database to local service.
$databases['default']['default'] = array(
'database' => 'local_db_name',
'username' => 'root',
'password' => 'root',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
);
// Turn off css and js consolidation for local development.
$conf['preprocess_css'] = 0;
$conf['preprocess_js'] = 0;
// Turn on all error reporting for local development.
error_reporting(-1);
$conf['error_level'] = 2;
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment