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.

If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
Become a patron at Patreon!
Profile Picture for CogDog The Blog
An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca