drupal planet

A global settings.php file

I've begun adding this to each of my local D7 sites. I include this global settings file so I can edit just one $conf array. It works okay.

If an override is needed for a particular site, place it after the include for the site that needs it, or just skip the include.

include_once '/Users/.../Sites/settings-global-d7.php';

Drush aliases w/ PDO SSL support

At Classic, some developers are standardizing the way they sync their local development environments with remote testing servers. I recently invested time re-familiarizing myself with drush aliases. I am documenting the process in hopes of simplifying the steps for others.


Here’s the typical workflow beforehand:

  1. ssh into remote server
  2. Backup test server database by some means
    1. Ex: mysqldump, drush sql-dump, backup/migrate, locate a recent deploy-site backup
  3. Copy and restore database backup in step #2 to local environment
  4. Run a set of commands, a bash script, or some such to do one, or any of the following:
    1. clear cache
    2. sanitize user logins/emails
    3. disable modules specific to test server environment
    4. enable modules specific to, or aiding, your local development environment
  5. Begin feature development


Using drush aliases and the the sync enable command, we can simplify the process to one step:

$ drush sql-sync @mysite.mysite-test @mysite.mysite-local -y