Upgrading Drupal

I was trying to do some real work until I found out that my retardo-blog has been having some issues with PHP. This opened up a giant can of worms because now I want to move off of my shared host.

Get latest version of drupal.

wget http://ftp.drupal.org/files/projects/drupal-X.XX.tar.gz
tar xzf drupal-X.XX.tar.gz
cd drupal-X.XX

Copy the important directories from the old version

cp -r ../original/files .
cp -r ../original/sites .

Backup MySQL

mysqldump -u -p databasename > backup_drupal_X.XX.sql
mysql -u -p databasename < backup_drupal_X.XX.sql #restore

Swap in updated code

mv blog drupal-BACKUP
mv drupal-X.XX blog

Update and migrate system

Now update your modules.

Run update.php again for each module. It’s OK to update the modules in bunches.

Using ImageCache with nginx

I couldn't get the ImageCache module for Drupal to work for the longest time because I didn't realize that the module came with a .htaccess file that pushes the image load back through Drupal to calculate the caching properly. Knowing this I was able to find this magical chunk for your nginx.conf (or your virtual host config). Slip this code in near the static serve file command


# imagecache needs to have php read any files that it's planning to manipulate
location ^~ /sites/default/files/imagecache/ {
     index  index.php index.html;
     # assume a clean URL is requested, and rewrite to index.php                                                                 
      if (!-e $request_filename) {
          rewrite  ^/(.*)$  /index.php?q=$1  last;
# serve static files directly
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
    access_log        off;
    expires           30d;

Textile Module for Drupal 6

As of this writing the Textile module is not available for Drupal 6. The latest current downloadable version is for Drupal 5.x.

Rather than downloading a full tar or gz file, there is a patch available. Drupal 6 Patch. Here’s how to do it. Works for Linux and Mac

  • Patch the files (cd into your textile dir)

patch textile.info < textile.info_.6.patch
patch textile.install < textile.install.6.patch
patch textile.module < textile.module.6.patch

Syndicate content