Posts

Showing posts with the label drupal

Batch module replace in Drupal

Every so often I update a Drupal site and need to update a bunch of modules/themes at the same time. Fortunately, the naming convention of modules/themes is consistent so I can update many with one little script. First, scp all the module/theme gz files to the location you want to store them. Next, cd into that directory. Last, run this script: for thm in $(ls *.gz) do         thmnew=$(ls ${thm}|cut -d'-' -f1)         tar -cf ${thmnew}_old.tar ${thmnew}         mv ${thmnew}_old.tar /usr/local/src/drupal/tmp/themesupgraded/         mv ${thmnew} /usr/local/src/drupal/tmp/themesupgraded/         tar -zxvf ${thm}         mv ${thm} /usr/local/src/drupal/tmp/themesupgraded/ done

Drupal site move results in off-line message

I recently moved a Drupal site from test to production. I followed the standard line for moving a site. When I went to access the new site it told me the site was off-line. My big problem was that my log files weren't telling me anything useful, nothing at all. I kept poking around and finally figured out I had made a typo when setting up the database and didn't have the MySQL permissions assigned correctly. As soon as the proper grant was issued on the database the site immediately became available.