Upgrading from Drupal 4.5 to 4.6.3

Last modified: August 17, 2008 - 16:31

The following is a simple step-by-step approach to upgrade a site from Drupal 4.5 to Drupal 4.6.3.

It takes about an hour and a half to complete and it is important to follow each step carefully to avoid glitches or gremlins appearing at a later stage.

Before you Start

If you are using any of these modules in your Drupal 4.5 site that you plan to upgrade, please read the notes at the bottom of this book page: Image.module, Forum.module, Event.module.

Make a backup of your Drupal MYSQL database and the Drupal 4.5 files & folders on your server, so you can recover your complete site in case anything should go wrong during the upgrade.

Step-by-step Upgrade from Drupal 4.5 to 4.6.3

  1. Log into your Drupal 4.5 site as the administrator, go to ADMINISTER --> MODULES and disable all extra add-on or contributed modules you may have installed, i.e. modules that don't come with the core Drupal download . I have listed below the core standard Drupal Modules:

    standard Drupal modules
    --------------------------
    aggregator.module
    archive.module
    block.module
    blog.module
    blogapi.module
    book.module
    comment.module
    drupal.module
    filter.module
    forum.module
    help.module
    legacy.module
    locale.module
    menu.module
    node.module
    page.module
    path.module
    ping.module
    poll.module
    profile.module
    queue.module
    search.module
    statistics.module
    story.module
    system.module
    taxonomy.module
    throttle.module
    tracker.module
    upload.module
    user.module
    watchdog.module
    =================

  2. Go to ADMINISTER --> THEMES and make BLUEMARINE the default theme.

  3. Go to the root of the Drupal directory and open the file called CHANGELOG.txt. Make a note of the version number and date (important!) in the first line at the top of the file.

  4. Go to your includes directory and make a copy of the conf.php file on your local computer.

  5. Delete all the Drupal files and directories from your server using an FTP program or a control panel filemanager provided by your web host.
    IMPORTANT: before doing this, make sure you have a backup of your Drupal MYSQL database and the Drupal 4.5 files & folders on your server. You will need your old "/files/" folder and its contents to copy to the new site later, and backing up the other files will allow you to recover your complete site in case anything should go wrong during the upgrade.
  6. Download Drupal 4.6.0 and upload all the files to your server.

  7. Go to the sites/default directory and edit the settings.php file (you can use your old conf.php file as reference).

  8. Once settings.php file has been edited, go to your site and login as the administrator.

  9. Go to http://www.example.com/update.php.

  10. You should be presented with the instruction screen for upgrading. Click on the link to start the upgrade script; you will be asked from which version you are upgrading from. This is very important: revert back to the note you made earlier from the 4.5 CHANGELOG.txt file.

  11. Click the "Update" button. You should see a successful green "OK" after each update operation and finally a link to go to your main and administration pages. If you get red error messages, it means some or all of your update has failed.

  12. On a sucessful update, go to the root Drupal directory and make a note of the version number & date from the very top of the CHANGELOG.txt file (important).

  13. Go to the sites/default directory and make a copy of the settings.php file to your local computer.

  14. Delete all the Drupal files from your install.

  15. Download Drupal 4.6.2 and upload the files to your server and restore the information in settings.php.

  16. Go to your site and login as the administrator.

  17. Go to http://www.example.com/update.php (click on your browser's Refresh button a few times to make sure it's not loading from cache and the previous update.php file).

  18. Click on the link to run the update script. Select the correct version number and date from the CHANGELOG.txt file you made a few steps back.

  19. Click the "Update" button. You should see a successful green "OK" after each update operation and finally a link to go to your main and administration pages. If you get red error messages, it means some or all of your update has failed.

  20. Repeat this process again to upgrade from Drupal 4.6.2 to version 4.6.3.

  21. Once you have reached a live version of 4.6.3, you can now start downloading the 4.6 versions of the add-on contributed modules & Themes you used with your 4.5 site. All appear to work okay apart from event.module that needs extra special attention. When you're downloading a 4.6 version of the modules. Some of the more complex modules will usually have a unique module-update.php file included, to ease the process. Check the readme.txt or install.txt in the module folder as you download them to check for upgrading instructions.

Finalising your upgrade

There are a few significant differences between Drupal 4.5 and 4.6.x that means to finalise your upgrade you may need to apply the following:

Rebuilding your Drupal Search Index.

Because of the new improved search module, your site's search index will need to be rebuilt.

  1. Go to ADMINISTER -->> SETTINGS -->> SEARCH. It will indicate how much of your upgraded site is being indexed.
  2. If your site search index is not 100%. Type www.example.com/cron.php in your browser.
  3. Wait for a minute (longer if you have a very large site) and press the back button to bring you back to the SETTINGS/SEARCH page.
  4. If your site is still not 100% indexed and/or you received an error message when running CRON.PHP adjust the settings accordingly and type www.example.com/cron.php again.
  5. Repeat the process until your site is 100% indexed

Blocks

There are a lot of improvements in how BLOCKS are built in Drupal 4.6.x. If you had block paths configured on the block administration page in your Drupal 4.5 site, you'll have to reconfigure these after the upgrade.

  1. Go to ADMINISTER --> BLOCKS
  2. Click on the CONFIGURE link for each BLOCK you applied special PATH conditions to on your Drupal 4.5 site and modify accordingly

Permissions

Please note that permissions screen has moved to ADMINISTER -->> ACCESS CONTROL in Drupal 4.6.x. To ensure your permission settings match those set on your Drupal 4.5 site, follow these steps:

  1. Go to ADMINISTER --> ACCESS CONTROL
  2. Double check that the permissions are correct and click on SAVE CONFIGURATION.

Forums

After upgrading, you need to re-associate the category terms you used in Drupal 4.5.x to FORUM TOPIC node types. The reason is that there is a change in how FORUMs are managed between version 4.5.x and 4.6.x including the new FORUM configuration screen that makes it easier to manage your FORUMS.

  1. Go to ADMINISTER --> CATEGORIES
  2. Click on EDIT VOCABULARY TERM for the FORUM category
  3. Scroll down and ensure that FORUM TOPIC node types are associated with your Vocabulary Term.

There also appears to be a bug in the update.php script dealing with forums that registers every LAST POST in each category to Anonymous.

Worth checking the Upgrade Poblems Forum in case someone else has worked out what's wrong.

Images

Upgrading a site with the image.module installed also appears very problematic. I didn't have the image.module in the site I upgraded so I can't help with any tips. Best to follow the forum discussions in the Upgrade Problems Forum

Events

Upgrading a site with the event.module installed also appears very problematic. The events.module comes with a special update-event.php script, which appears to work when you run it, but, I have tried it on a few occasions and it doesn't seem to upgrade properly.

I ended up spending so long trying to work out what's wrong it was quicker for me to copy and paste each event from the old site into the new site by hand. There maybe a better solution in the Upgrade Problems Forum

 
 

Drupal is a registered trademark of Dries Buytaert.