Skip to content

Instantly share code, notes, and snippets.

@cesarmiquel
Last active August 29, 2015 14:25
Show Gist options
  • Save cesarmiquel/ad4bd0d84ddbffbe1bbc to your computer and use it in GitHub Desktop.
Save cesarmiquel/ad4bd0d84ddbffbe1bbc to your computer and use it in GitHub Desktop.
Configure a new Drupal site
#!/bin/bash
# ---------------------------------------------------------------------------------------
# Configuration options
# ---------------------------------------------------------------------------------------
DEFAULT_ADMIN_THEME='adminimal' # Other common options: seven - adaptivetheme_admin
DEFAULT_THEME='bartik' # Other common options: omega - zen - bartik
ADMIN_PASSWORD='<strong-password>'
# ---------------------------------------------------------------------------------------
DRUSH=`which drush`;
# Modules to disable
MODULES='overlay color'
$DRUSH -y dis $MODULES
# Enable common modules
MODULES='ctools views views_ui devel devel_themer commentformsettings nodeformsettings \
nodequeue entity libraries pathauto strongarm token \
memcache memcache_admin features'
$DRUSH -y en $MODULES
# Set default admin theme
$DRUSH vset admin_theme $DEFAULT_ADMIN_THEME
$DRUSH vset node_admin_theme 1
# Set default theme
$DRUSH vset theme_default $DEFAULT_THEME
# Set Admin password
$DRUSH user-password admin --password="$ADMIN_PASSWORD"
# This set of modules depend more on the requirements for the site
MODULES='flag flag_actions media media_vimeo media_youtube webform workbench workflow workflow_rules'
$DRUSH -y en $MODULES
# Just in case..
$DRUSH cc all
# Create some users
$DRUSH user-create <username> --mail="<email>" --password="<password>"
$DRUSH user-add-role "administrator" --name <username>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment