Last updated 12 October 2014. Created on 28 November 2008.
Edited by Swift Arrow, threexk, dokumori, LeeHunter. Log in to edit this page.

A lot of people are having difficulty in upgrading from Drupal 5 to Drupal 6; this post tries to address this step by step. It attempts to put into words what this Drupal upgrade tutorial shows in video format, and add more information.

  1. Make a backup of all of the files on your Drupal 5 site, as well as your database, so that you can restore in case something goes wrong. In particular, you must make a copy of the “Files” and “Sites” directories from the Drupal installation directory. It is also highly recommended that you do the upgrade on a local copy site or development site to test, and then move it to production.
  2. Planning: If your site needs some particular contributed modules, ensure that those modules are available from their respective module pages for Drupal 6.x. If your module is not yet available for Drupal 6, you may wish to consider postponing your upgrade, or finding a different module to use. There were also some core module changes between Drupal 5 and Drupal 6 that might affect your site:
    • If your site used the core Drupal module to enable one Drupal site to use another Drupal site for authentication (e.g. allows you to log in using your user name and password), you will need to get the Site Network module to reproduce this functionality in Drupal 6.
  3. Begin the upgrade process by first upgrading Drupal and all installed modules to their latest available 5.x versions. You can check on available updates for your 5.x Drupal install using the Update Status module.
  4. Log in as the master user (the first user account you set up in Drupal, which always has full privileges) and set your Drupal site to off-line mode. This can be done as follows. In the Drupal administration panel, navigate to Administration >> Site configuration >> Site maintenance. Select the site status as off-line, and save the configuration.
  5. Set your theme to a core-provided theme such as Garland or Bluemarine.
  6. From within the Drupal 5.x administration panel, navigate to the Modules page. Disable all contributed modules, for now. Disable the Update Status module and uninstall this module -- it has been included in the core of Drupal 6.
  7. From the Drupal 5.x administration panel, navigate to Logs >> Status report. Fix any problems here before upgrading.
  8. At this point, it would be a good idea to make another file and database backup. This will help you if something goes wrong during the 5.x to 6.x upgrade and you need to start over. Also it's good to review the minimum Drupal 6.x requirements at this point:
    • Web Server:
      Apache 1.3 or Apache 2.x hosted on Unix/Linux or Windows.
      IIS5 or IIS6, IIS7 if PHP is configured correctly.
    • PHP:
      Recommended: PHP 5.2 or higher.
      Required: PHP version 4.3.5 or higher.
    • Database Server:
      MySQL 4.1 or MySQL 5.0
      PostgreSQL 7.4 or higher
  9. Delete all Drupal files from the Drupal installation directory.
  10. Download the latest version of Drupal 6.x from Unpack the files and upload them to your Drupal installation directory.
  11. Upload the old “Files” and “Sites” directories from your backup to the Drupal installation directory. If other system files such as .htaccess or robots.txt were customized, re-create the modifications in the new versions of the files using the backups.
  12. Run update.php by visiting (replace with your Drupal installation's domain name and path.).
  13. Download and replace all non-core modules to their latest version for Drupal 6.x
  14. Enable your non-core modules and re-run update.php to update custom and contributed database tables. It may help to enable them in the following sequence, running update.php inbetween each step.
    • Core CCK Modules First
    • Additional CCK Modules
    • Other Modules
  15. Individual non-core modules may need their settings updated. If you were using the Views module in Drupal 5, it may appear that your views were deleted when upgrading to Drupal 6. To recover your views, upgrade them at this URL: (replace with your domain name).
  16. Update your theme for 6.x compatibility, if you are using a custom or contributed theme, and enable it.
  17. Navigate to the Administration >> Content >> Post settings and click 'Rebuild permissions' button to rebuild the permission.
  18. Verify that your site is working correctly.
  19. Navigate to the Administration >> Site configuration >> Site maintenance page, set your website status to online mode, and save your settings.
  20. If you use MySQL for your Drupal database, revoke the LOCK TABLES and CREATE TEMPORARY TABLES grants for your database since they are no longer needed by Drupal 6.

Looking for support? Visit the forums, or join #drupal-support in IRC.


Allthegearnoidea’s picture

This was a great help when I attempted to upgrade my D5 site to D6, however used in isolation these instructions still did not give me the whole solution to upgrading.

Because the site I was upgrading relied on CCK I also had to do what was outlined here before the upgrade went through.

I got a lot of warnings when the upgrade ran but as I put modules in place again gradually the warnings disappeared, just wanted to add my experience in case it helps any other non techies like me struggling through the upgrade procedure.

Support for families with children with medical conditions:
Buy allergen free foods from

caspercash’s picture

Thank you very much for the author/s of this set of instructions on how to upgrade from drupal 5 to drupal 6! Saved a lot of time and improves the instructions that was previously posted on this url ( More power to DRUPAL!

hometoy’s picture

This has helped me greatly. We have a Drupal 5.5 I am trying to upgrade to Drupal 7 and need to step through 6 to get there. This was consices but thurough as the upgrade went off with little in the way of surprises.

The biggest issue I have found, outside of not doing it in the right order at first, is finding all of the modules and their updated versions.

Swift Arrow’s picture

Well, I had a WSOD while going through this, and found this bug report, which goes over a number of possible issues:

To fix the problem, I had to remove all my modules (I was trying to cheat by uploading everything at once, and updating the modules later, but apparently that doesn't work). I ALSO had to add the language column to the url_alias table. This was done through PHPMyAdmin with the following information:

  • Name: language
  • Type: varchar
  • Length: 12
  • Encoding: utf8_general_ci
  • Null: No