Drupal-4.7.7 Upgrade Notes...

I run the site on the open-source Drupal CMS and recently updated to the latest 4.7.7 version. The site has quite a few customizations and is not a standard install.

The html document root is a symbolic link to the actual drupal gunzipped folder and all other relevant custom modules are also just symbolically linked from the modules folder to keep the updates as simple as possible.

I also use the "bluemarine" theme which has been customized and named as "linuxweblog", so updates don't necessarily override my custom theme.

Pre-Update Preparation:

  1. Backup database and site files.
  2. Login to website as the administrator.
  3. Disable the "Tag Cloud" block as it has some custom php.

Update:

  1. `cd /var/www/`
  2. Download from http://drupal.org/project/releases
  3. Untar the gzip package.
  4. `rm html` -- remove the symbolic link.
  5. `ln -s drupal-* html` -- link to the newly extracted folder.
  6. `cd html`
  7. Edit the "sites/default/settings.php" file
    • Add the correct database, username and password to $db_url
    • Edit the $base_url without trailing slash to http://www.linuxweblog.com
  8. Go to linuxweblog.com/update.php and run the update.

Post-Update Customizations

  1. `cp -a themes/bluemarine themes/linuxweblog
  2. Copy or merge node.tpl.php, page.tpl.php and style.css to the linuxweblog theme folder.
  3. Merge .htaccess file and bring over the old customizations.
  4. `cp -a ../drupal-old-*/{robots.txt,favicon.ico} .`
  5. `ln -s ../site_files/ site_files` -- create the symbolic links to where the cache and other static files are placed.
  6. `ln -s site_files/cache/ cache` -- create the link to the cache.
  7. `ln -s ../../drupal_contribs modules/custom_mods` -- create the link to the custom modules.
  8. Enable the "Tag Cloud" block.
  9. Re-apply the google search hack to the "search.module" .

Security:

  1. `cd /var/www/`
  2. Chown -R user:group drupal-*
  3. Set the directory permissions: `find . -type d -exec chmod 755 {} \;`
  4. Set the file permissions: `find . -type f -exec chmod 644 {} \;`
  5. `chmod 640 sites/default/settings.php`
  6. `chgrp apache sites/default/settings.php`
Comment