While using Drush on a client’s website I noticed that it was showing up headers when it shouldn’t be. It was showing ugly things like this:
Set-Cookie: SESSc21f969b5f03d33d43e04f8f136e7682=d4735ec22fbf70b7d55bc7bd80691ad4; expires=Sun, 02-Mar-2014 18:44:47 GMT; path=/
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Fri, 07 Feb 2014 15:11:27 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Content-Type: text/html; charset=utf-8
A little investigation showed that drush was running as with php CGI rather than CLI. It was a simple matter to find out the path to the PHP CLI and then to modify the alias to Drush and PHP in the .bashrc file (alternatively, you may have specified it in the .bash_profile or in .profile). So here’s what you SHOULD use:
alias drush='/usr/bin/php-cli ~/public_html/drush/drush.php'
A while ago, I wrote about un-TARing multiple files in one go on the server to install multiple contrib modules for Drupal.
Of course, it seemed like the easiest thing in the world back then… But then, in 2010, the world still had Kodak films in production.
Now, allow me to show you the truly simplest way to install a drupal and add contrib modules – Drush. Of course, Drush allows for even more automation, but this workflow is quite sufficient for me at this time. It’s quite simple to install Drush on a Dreamhost Shared account with SSH.
Target folder – home/coloursalive.com
to the level above the target folder
confirm that the file has downloaded
tar -xzvf drupal-7.14.tar.gz
a new folder called drupal-7.14 is created
- check that there are no files that are required in the target folder
- Copy / Backup any files that are needed from the target folder
- delete the target folder and all subfolders
rm -R coloursalive.com
- navigate to target folder in browser (in this instance www.coloursalive.com) and follow instructions to install drupal
- come back to shell once basic install is completed
- Download most basic modules
drush dl token pathauto ctools views admin_menu wysiwyg imce webform libraries jquery_update views_slideshow imce_wysiwyg devel entity rules page_title
- Enable the modules that have been downloaded. In some instances additional modules that make up the project are downloaded. Assess the necessary modules to be enabled and enable them.
drush en token pathauto ctools views views_ui admin_menu_toolbar admin_devel admin_menu wysiwyg imce webform libraries jquery_update views_slideshow views_slideshow_cycle imce_wysiwyg devel entity rules rules_admin page_title
- Ensure OK / success messages on all modules
- Move over to the admin section of the website and continue setting up the install
I’ll be happy to hear from you if you have any suggestions. Leave them in the comments, please.