Skip to content

Instantly share code, notes, and snippets.

@ianlintner-wf
Last active September 13, 2016 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianlintner-wf/923489065b4234490283a847420c9519 to your computer and use it in GitHub Desktop.
Save ianlintner-wf/923489065b4234490283a847420c9519 to your computer and use it in GitHub Desktop.
Drupal Local Development Tools/Scripts/Notes

This is a collection of files, scripts and tips to get local development up and running.

Import a database via drush.

drush sql-drop
drush sql-cli < /mnt/db/backup.sql

Export a database via drush

drush sql-dump > /mnt/db/backup.sql

After a database import.

  • Clear Memcache see flushmemcache.sh file
  • drush cc all
  • drush vset file_temporary_path "/tmp"
  • drush vset preprocess_js 0
  • drush vset preprocess_css 0
  • drush pm-disable securepages
  • drush pm-disable simplesamlphp_auth
  • drush cc all
#memcached=ip/server
echo 'flush_all' | nc memcached 11211
<?php
// This is an example common settings used to update dev settings for local development.
$conf['simplesamlphp_auth_activate'] = 0;
$conf['file_temporary_path'] = '/tmp';
$conf['preprocess_js'] = 0;
$conf['preprocess_css'] = 0;
$conf['error_level'] = 2;
$conf['smtp_host'] = 'mailcatcher';
$conf['smtp_hostbackup'] = '';
$conf['smtp_username'] = '';
$conf['smtp_password'] = '';
$conf['smtp_port'] = '1025';
$conf['smtp_protocol'] = 'no';
<?php
//... Settings.php or site.com.inc
// This would go at the end of all your local sites settings files.
if (file_exists('/mnt/webdev/configs/common/local.drupal.settings.inc')) {
require '/mnt/webdev/configs/common/local.drupal.settings.inc';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment