Upgrading Drupal a full number version from a cold, dead database
So we got a Drupal 4.7 database from a client without the old 4.7 code.
OK, sure, slap that directly into a fresh Drupal 5 installation, and update it, right?
Uh, errors everywhere. Can't get to the admin section, let alone log in!
Well, you're not necessarily expected to. Normally you could already be logged in, but if the errors from Drupal not knowing where the modules are (they all moved into their own folders in Drupal 5) you aren't going to be able to navigate in the site at all. Except you aren't supposed to, you're supposed to go directly to /update.php which gives, right on the page (below the errors, no longer fatal) instructions on editing it to allow access without logging in.
Still getting errors galore? You've probably inherited a Drupal site that put PHP in its database -- in blocks (content for custom blocks lives in the table boxes) or even in variables. It's saying something about eval()'d code, isn't it? You can search an entire MySQL database with phpMyAdmin and cut out this wayward code from the pages (or more damagingly, blocks) where it's showing up. (And go back and reproduce the functionality later).
Now you can log in and change to your theme!
And that's how to revive a cold, dead database into a brand new upgraded Drupal site!
Actually the first part applies equally to any upgrade, put especially full version updates.
If you can't read the upgrade instructions (and don't forget the UPGRADE.txt in your Drupal root directory), then watch the video.
Comments
Post new comment