Updating Drupal

Welcome to my Updating Drupal page. The Liss Mug site is Hosted on the Linux Operating system, the commands below are not strictly Mac OS Shell commands, but Linux ones.

Updating Drupal, Core, Modules and Themes

Connect to Remote site using secure shell (ssh), either specify the ip address as shown below or state the fully qualified domain name in the form username@domain-name

#> ssh username@a.b.c.d

Download the latest Drupal updates. Use the Web Browser to locate the linked file. Then right click and choose "copy Link", this copies the download location to the paste buffer. Then use [⌘ + V] or [cmd + V] to paste the link in to the terminal window after the command "wget".

#> wget http://ftp.drupal.org/files/projects/drupal-6.17.tar.gz

Unzip the file using the tar command

#> tar xvfz drupal-6.17.tar.gz

Copy the unexpanded files to the live location overwriting the existing files

#> cp -r ./drupal-6.17/* ./public_html

Install the updates by opening the update.php page in a web browser and clicking on the update button. The file is in the root of the site public_html.

Installing Modules

Download the module from drupal website, use the Web Browser to locate the linked file. Then right click and choose "copy Link", this copies the download location to the paste buffer. Then use [⌘ + V] or [cmd + V] to paste the link in to the terminal window after the command "wget".

#> wget http://ftp.drupal.org/files/projects/views-6.x-2.11.tar.gz

After downloding Modules unzip the files directly into the modules folder. This example Unzips the Tar File "views-6.x-2.11.tar.gz" the views module. Replace the name here with file you are unzipping. The best approach is to unzip the tar file directly into the target directory and we can do this with the "-C" switch. After this switch specify the target location the zipped files will expand into. Leave off the trailing slash. Use the following command.

#> tar xvfz views-6.x-2.11.tar.gz -C ./public_html/modules

Tiding Up

Move all the modules to the updates folder

#> mv views-6.x-2.11.tar.gz ./updates/

Move the drupal core update tar file to updates folder

#> mv drupal-6.17.tar.gz ./updates/

Finaly remove the expanded core updates folder drupal-6.17 folder

#> rm -r drupal-6.17/

Then Logout to end the ssh session.

#> logout

Post Upgrade

After downloading and installing modules, and enabling any modules or updates to any modules, then it is required to do the following tasks.

  1. Run update.php by adding update.php at the end of the site URL in a browser.
  2. Update the Admin Role to include access to any newly installed or enabled module