Joined October 2014
·

Dustin LeBlanc

Ithaca, NY
·
·

To handle loading config outside of Pantheon it is actually quite simple to do the following at the end of settings.php:

/**
 * Load local development override configuration, if available.
 *
 * Use settings.local.php to override variables on secondary (staging,
 * development, etc) installations of this site. Typically used to disable
 * caching, JavaScript/CSS compression, re-routing of outgoing e-mails, and
 * other things that should not happen on development and testing sites.
 *
 * Keep this code block at the end of this file to take full effect.
 */
if (!defined('PANTHEON_ENVIRONMENT')) {
        $conf_path = conf_path();
        if (file_exists(DRUPAL_ROOT . '/' . $conf_path . '/settings.local.php')) {
          include DRUPAL_ROOT . '/' . $conf_path . '/settings.local.php';
        }
}

Then in your settings.local.php file:

<?php
$databases = array (
  'default' =>
  array (
    'default' =>
    array (
      'database' => 'some_db',
      'username' => 'some_user',
      'password' => 'some_pw',
      'host' => '127.0.0.1',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);

// Other stuff useful during development

// Disable cache
$conf['cache'] = 0;

// Disable css and javascript aggregation by default
$conf['preprocess_css'] = 0;
$conf['preprocess_js'] = 0;

$base_url = 'http://site.dev:8888';

If you are running php 5.4 or later and drush 6 or newer you can just run drush rs --dns site.dev:8888 from the sites root.

Achievements
1 Karma
0 Total ProTip Views