Every Flavour Beans

“The time has come…to talk of many [technologies].” –Lewis Carroll(’The Walrus and the Carpenter’)
Development Tools. Web Frameworks. GNU/Linux. Nokia N800. Video Encoding.

May 22, 2006

Upgrading from Drupal 4.6.6 to Drupal 4.7

Filed under: Web — tabrez @ 8:55 pm

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:

  1. I downloaded the latest version of Drupal software, Drupal 4.7, from the drupal.org website: Drupal 4.7.0
  2. I took a complete backup of the existing Drupal installation in a safe location:
    • Backed up all the files and folders present in the Drupal installation location(themes, modules, admin etc).
      All Drupal Files
    • Took the full backup of the drupal database.
  3. I always first test out the backup to see if it is in good condition or not before overwriting the original installation; a bad backup is worse than no backup. So I tried the restore procedure on the local machine and made sure that everything is working fine and I can depend on this backup if something goes wrong.
  4. I then logged into my old installation using my administrator account and disabled all the non-core modules(modules that didn’t come with Drupal 4.6.6 and I had to install them manually). I also reverted back to the default ‘bluemarine’ theme and disabled all the other themes. Finally, I logged out.
  5. I renamed the old installation folder ‘drupal’ to ‘drupal_bak’ and copied the downloaded latest version of Drupal and gave it the folder name ‘drupal’. I copied the ’settings.php’ file from drupal_bak to drupal folder. I do not have any files in ‘files’ folder, otherwise I would have had to copy that folder also from drupal_bak to drupal.

    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).

  6. 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.
  7. 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:

    • Moved drupal to drupal_bak and drupal_new to drupal
    • Ran the http://mydomain/drupal/update.php file. Selected “Update” button.

    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.

  8. 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.
  9. 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:

    1. Download the 4.7 versions of the modules that were being used earlier with the website.
    2. Extract them in the modules folder.
    3. Login as administrator and enable the modules from the modules page: administer->modules.

    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:


If you want to receive future posts by email, enter your email address here:

Related Posts:

  • Wordpress Upgrading Experience With Automatic Upgrade Plugin
  • Host Your Projects On Internet Using Google Project Hosting
  • Free Software Community Catching Up to Social Networking Trend
  • Upgrading to Wordpress 2.3 with Zero Downtime!
  • How I Upgraded to Wordpress 2.3 on Live Blog With Zero Downtime
  • EasyEclipse is the Best Packaged Distribution of Eclipse Platform
  • What is New in Wordpress 2.3 (Beta 1/2)?

  • Readers who viewed this page, also viewed:

    • Coming soon. (Gathering data)

    No Comments »

    No comments yet.

    RSS feed for comments on this post. TrackBack URI

    Leave a comment

    Subscribe without commenting


    Copyright (c) 2006, 2007 Tabrez Iqbal.
    Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. Verbatim copying and distribution of this entire article is permitted in any medium without royalty provided this notice is preserved. A copy of the license is included in the section entitled "GNU Free Documentation License".


    Powered by WordPress
    This website is hosted by Dreamhost