Upgrading duvien.com to Drupal 6

There isn't one solution for all when it comes to doing a major upgrade from a previous version of Drupal to latest version because you have to take into account the different contrib modules and or custom modules that are already installed, including the use of your Views.

But hopefully, by showing you how this site was upgraded it may provide some good pointers to upgrading your own site.

Upgrading Drupal 5 to Drupal 6

Backup your site

First of all, make a complete backup of your site. All the files and the database. Create a test site from your backup but do not use your backup as the test site. Keep it somewhere safe.

Find all your modules

If you haven't yet installed the update status module for Drupal 5, do so now. This handy module will provide a page listing of all the modules installed on your site and tells you which modules needs updating. We aren't interested in downloading the D5 version of the modules. Instead we'll use it to click on the module title to take us directly to the page on drupal.org so we can download the module version for D6. At this crucial point you may find that some of the contrib modules you are using may not have a D6 version. If this is the case, you'll really need to decide whether you want to drop the module if it's not that important or try and find an alternative module to use. If you have custom modules then it should really be upgraded to work with D6 before you press on. I've been lucky to have found most of the modules i needed for my site.

Once the site is upgraded to Drupal 6, the update status module is no longer required since this is now in core as of D6.

At this stage, i downloaded every (D6 version) modules that is installed on my site into a folder and kept them to one side for later.

Download contrib theme

If you are running a contrib theme, then visit drupal.org and find your Drupal 6 version of the contrib theme.

Running the update.php file

Login to your site as admin (userID 1). Change your theme back to the default Garland theme. Now delete all the files from your existing site. But keep your sites and files directories. In Drupal 6 the default files directory is located in /sites/default/files but you don't need to move the files directory during updgrade since Drupal 6 will remember and keep the settings.

It is assumed that all your contrib/custom modules are kept in sites/all/modules/ directory. If not, you need to sort out which is contrib and which is core modules in the modules directory.

Download Drupal 6 and copy this to your existing site. Copy sites/default/default.settings.php and rename it to settings.php and go back to your backup copy of the settings.php file and copy and paste the DB config to your new sites/default/settings.php, where it says:

$db_url = 'mysql://username:password@localhost/databasename';

Now run the update.php script. To do this, in the browser address bar, type:

http://your_domain_name/update.php

At this point i did notice an error about audio module which i chose to ignore for now and skipped to the modules page. Below is the error notice and the module page after upgrade.

Error page Module page

Updating modules

This part is quite repetitive, i basically went thru each module - delete the module and add the new one into place. Each time i added a module i ran update.php script until all the modules were updated. I also left Views modules the last module to update. During this stage i was getting the same error each time but by the time it got to the end it seem to be okay as shown in the screenshot below. Another error i was getting was an issue with the menu (menu_router). I guess this was one of the major changes, however the error finally disappeared after running update.php several times during updating of each modules.

Module page

At this point, if errors are still showing up, you might want to clear your cache by going into the DB table and delete all entries.

Rebuild your theme

If you are using a contrib theme then it's a simple case of downloading the theme and installing it. If it's a custom theme then you should rebuild it and apply the changes accordingly. Read the documentations or get the Drupal 6 theme book which was a really useful book to aid me along in converting my theme to Drupal 6.

Upgrading Views

One of the most essential module along with CCK. Unfortunately there exist no upgrade path for Views. CCK was find but when i updated Views module, i had lost all my previous Views and had to rebuilt it. This wasn't too bad since i didn't have many Views created on this site but it's worth reading up on the issue queues first to see if there have been any major issues in upgrading or any solution to your upgrade if you have many Views already built. That's it and i hope this was useful. Good luck with your upgrade.