Upgrading from Drupal 4.6.6 to Drupal 4.7
Now that the 4.7 version of the Drupal CMS is released, I went through the documentation for the upgradation process, watched the videocast available on the website, and on one bright afternoon, decided to attempt the upgradation of my drupal 4.6.6 installation. These are the steps that I followed to complete the task:
Took the full backup of the drupal database.Its always advisable that you don’t overwrite the old installation files with the files from the new release - for security reasons(some old files may be left out exposing a potential vulnerability etc). Its better to completely remove the old files and the folders and then freshly copy the files from the new version. If Drupal is installed in a sub-folder, as opposed to being installed in the root folder of the web domain, the process becomes as simple as renaming the old folder to a different name and then copying the latest version in its place. Later, the old version can be removed completely or atleast ’settings.php’ should be permanently deleted from it(don’t forget this).
I ran the update.php script by going to:http://mydomain/drupal/update.php
then clicked the ‘Update’ button and watched all the scrolling SQL statements closely for any errors. Fortunately, there was not even a single error. In anticipation that the hard work will be getting paid and Drupal 4.7’s home page would be welcoming me in all its splendour, I tried accessing the index page at http://mydomain/drupal, but was greeted with an error message instead, which indicated that a function called nodequeue_node_titles() was being called but its definition did not exist.
Yuck. I forgot to delete this function call that I had manually added to one of the blocks. Once the nodequeue module was disabled, there was no way that this line of code could work. I promptly had to go back to my previous installation(rename drupal to drupal_new and drupal_bak to drupal AND restore the backed-up database), login, disable everything again(modules, themes) and additionally, remove the above function call from the block that I had created. If I had added anymore such custom code in any other blocks/pages/files that depended on the non-core modules, I would have had to remove/commentize those parts too.
I repeated the above procedure to attempt the upgradation process another time:
When I tried to access the home page this time, there were no more surprises in store; the old familiar home page welcomed me with all my posts and the other stuff. I logged in as administrator to make a final check that everything is in proper order.
The next tough task was to find the latest, Drupal 4.7 compatible versions of my old themes and modules. I always try to use the modules/themes that are in active developement so that there is best chance of these modules/themes getting upgraded as soon as the main software is updated, and I can immediately continue to use them even after a version upgrade of the main software. If you use a module that is not in active development, then it may not get upgraded to the new version of the software at its release time and hence you may have to wait a long time/forever to get similar functionality after you upgrade. If the module is critical for the working of the website, then it can single-handedly stop you from upgrading to the latest versions! Another reason why you should use only those modules which add significant value to the websites and not try out every single module that is released for the software.Thankfully with Drupal, majority of the modules are upgraded to the latest version in no time. Among the rest, old version of some of them continue to work with the new Drupal version and some others work if their latest CVS versions are checked out. I was able to replace most of the modules with their 4.7 versions, and I am still in the process of finding the best possible way to replace the rest of them. The process is straightforward:
After confirming that everything is working smoothly and correctly, I permanently deleted the drupal_bak folder and all of its contents. If your journey was not as smooth as mine, you can refer to the following resources to get any assistance: