Drupal 5 Shell Game

Alan Levine aka CogDog barked this October 31st, 2006 12:21 pm

After much, much too long, I am able to focus back on our Drupal work for the NMC web site. Things are looking promising for version 5, so today I tried my hand for the first time at an upgrade, using the just released beta 1 version of Drupal 5.

Beyond the usual steps of backing up directory files and databases, the process outlined is easy– I needed to log in as admin to the two Drupal 4.7 sites I have; then empty the drupal code directories, upload the new code, and then add back in my site settings. Then I had to run the update script for each. The first one went smooth, as it should, since all I had was a stock template waiting for the new code.

But when I went to update the second one, all kinds of MySQL errors were vomited out to my screen.

And then I realized, I had done something bone-headed… when I re-uploaded by two sites folders, I took them from my laptop, where I run sites under a local URL like www.nmc.loc, but I had forgotten to change the site folder names when uploading! The first site worked, since I had its database connections in my default settings file. But of course, the other site borked because it was not finding the right configuration files.

So I took a chance and played a little web server shell game.

(1) rename my new drupal directory to drupal5 (after fixing the 2 site subfolders to correct names)
(2) re-upload my old drupal content (yea, backups!) to a drupal directory
(3) log in as admin user to the site.
(4) Shell swapped directory names- rename drupal –> drupal-old and then renamed drupal5 –> drupal.
(5) Ran the update.
(6) Dump drupal-old directory

It worked! Whew!

Now I have to test the modules out to see if they work… Sorry, nothing here yet worth showing.

Technorati Tags: ,

This entry was posted 1 year, 10 months ago and is filed under Blog Pile. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.


Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License
and may be patrolled by a friendly small dog (with a wagging tail)
This means you are free to use any original content published here (begs the question why)
as long as you provide linktribution.

.
Clicky Web Analytics