Created
January 13, 2014 22:32
-
-
Save phirework/8409407 to your computer and use it in GitHub Desktop.
Setting up local Drupal install with nginx and drush
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install drush by unzipping drush in home directory | |
# https://drupal.org/node/1674222 | |
# Add this to your .bash_profile | |
alias drush="DRUSH_DIRECTORY/drush.php" | |
# Set error reporting (navigate to drupal home directory) | |
drush vset error_level 2 --yes | |
# Create user, assigining privileges | |
create user 'USER'@'localhost' identified by 'PASSWORD' | |
grant all privileges on DATABASE.* to 'USER'@'localhost' | |
# Importing SQL | |
mysql.server start | |
mysql -u USER -pPASSWORD database_name < database.sql | |
# Drush - before you check the site, clear the cache | |
drush -l ${SITE_DOMAIN} cc all | |
# If there's an error with the above, try | |
drush -l ${SITE_DOMAIN} cc | |
# Useful things for troubleshooting | |
ps aux | grep ${NAME_OF_PROCESS} | |
kill ${NAME_OF_PROCESS} | |
# Reload nginx config file, equivalent of apachectl restart | |
sudo nginx -s reload | |
# Disable problematic modules | |
drush -l ${SITE_DOMAIN} pm-disable -y ${MODULE_MACHINE_NAME} | |
# Specific Graphite modules | |
drush -l ${SITE_DOMAIN} vset preprocess_js 0 --yes | |
drush -l ${SITE_DOMAIN} vset preprocess_css 0 --yes | |
drush -l ${SITE_DOMAIN} pm-disable -y masquerade | |
drush -l ${SITE_DOMAIN} pm-disable -y cdn | |
drush -l ${SITE_DOMAIN} vset honeypot_time_limit 0 --yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment