LearnWebDesignOnline.com is proudly hosted by Hostmonster.com

Drupal will often give us alert messages making sure we keep Drupal up to date. In this tutorial, we will show you how to update Drupal. Depending on particular Drupal setup, core customizations, and whatever plugins you have, there is no one exact way of upgrading Drupal. For proper upgrade instructions, read the upgrade.txt file found in the new Drupal installation package.
What this tutorial will show is how our particular Drupal site is updated and the general process for doing so. Your particular Drupal site may have special considerations that may require special extra steps etc. Please note that my steps differ from the upgrade instruction provided by Drupal. So use at your own risk. This is an example of upgrade of Drupal 6.10 to 6.12 for a Drupal single site installation and not for Drupal multisite configurations.
1. In the "Status Report" (Administer -> Reports -> Status report), we note our current version is at 6.10 and the latest version is 6.12.

To get more information we click the "available updates" link and see the following...

2. We click the link to download the recommended version and save the drupal-6.12.tar.gz file to a temp folder on our local computer. We need to unzip its content using a tool like 7-zip.

This gives us the tar file which we then have to extract again ...

3. This second extraction gives us the set of files in the folder "drupal-6.12". One of those files is UPGRADE.txt which gives you the upgrade instructions.
4. First thing to do is to do a full backup of your Drupal database and files. I also like to download all the Drupal files from my webhost to my local computer into a folder called "drupalcurrent".
5. Then I download the older Drupal Archived version 6.10 from "Drupal.org -> Drupal Project -> View All Releases" into a folder called drupal-6.10. This is the un-altered code of my site current Drupal version.
6. So now I have three versions of Drupal ...

I use a file comparison tool (such as BeyondCompare or WinMerge) to compare the code contents of each of the files in "drupalcurrent" and "durpal-6.10" and noting the differences between the two. That way I got a list of all the files that had been altered in my current version -- this are known as core customizations. Ideally if you had used Drupal's tempalte override system, you should not have too many core customizations.
My list of altered files are ...
5. Login to Drupal using the main administrator account (the account with user id 1).
6. Set Drupal to offline by "Administer -> Site configuration -> Site maintenance"...

7. Disable your custom and contributed modules by Administer -> Site Building -> Modules.
8. Now I use FTP software to copy the files from "drupal-6.12" to my webhost -- EXCEPT I do not copy over any files that is in the above altered files list. If the copying file already exists on my webhost, I let the copy overwrite the existing one if the existing one is not on the above list of altered files.
9. Apparently, I had made some customized changes to .htaccess and robots.txt files since the file comparison had noted difference from the original drupal-6.10 version. For the files such as .htaccess and robots.txt or any other that you have altered and you do not want the new drupal-6.12 files to overwrite them. You have to determine what custom changes you made to those files and to merge those changes in the new drupal-6.12 version of that file. Then after the code merge, you can put those files up on the server.
Using the file robots.txt as an example, an alternative method is to compare the drupal-6.10 version of robots.txt with the drupal-6.12 robots.txt version. If there are no changes, that means that that file does not need to be upgraded and you can keep the version that you already have on your webhost.
10. Also I like to compare the drupal-6.10 version of sites/default/default.settings.php and drupal-6.12 version of that file to see if they had made any changes to that file. If there are changes, you would have to merge those changes to your sites/default/settings.php file. Because your sites/default/settings.php had been created based on sites/default/default.settings.php.
11. Through similar reasoning, you should also compare customized theme files. In my example, I have made some customization to the file sites/all/themes/learnwebdesignonline/node.tpl.php
This file had been based on the file themes/garland/node.tpl.php
Hence I like to compare the drupal-6.10 version with the drupal-6.12 version of themes/garland/node.tpl.php
If there are difference, then I will have to merge those differences into my sites/all/themes/learnwebdesignonline/node.tpl.php
12. Run update.php by visiting http://www.example.com/update.php (replace
www.example.com with your own domain name). Follow the instructions in the update script, clicking "Continue" on the first page and then "Update" on the second page.
If you are unable to access update.php change the line in sites/default/settings.php to ...
$update_free_access = TRUE;
Once update.php is done running, change the line back to ...
$update_free_access = FALSE;
13. Enable your custom and contributed modules by Administer -> Site Building -> Modules. And run update.php again to update custom and contributed database tables.
14. You can confirm the successful upgrade by looking at the Administer -> Reports -> Status Report ...

15. Sometime after a successful core upgrade, one of your installed modules may not be compatible with the new core. In which case, you might see something like this...

in which case you would need to upgrade the module as well. This detection of incompatibility only detects active modules. That is why should should have your modules turned on before checking this. Remember that after every time you upgrade any module, you need to run update.php.
16. Go to "Administer -> Site Configuration -> Site Maintenance" and bring back site online. If your site still shows offline, then try clearing Drupal cache.
Contact us if you would like to hire us for Drupal work.