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.
- 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.
- 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. groups.drupal.org allows you to log in using your drupal.org user name and password), you will need to get the Site Network module to reproduce this functionality in Drupal 6.
- 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.
- 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.
- Set your theme to a core-provided theme such as Garland or Bluemarine.
- 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.
- From the Drupal 5.x administration panel, navigate to Logs >> Status report. Fix any problems here before upgrading.
- 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.
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
- Web Server:
- Delete all Drupal files from the Drupal installation directory.
- Download the latest version of Drupal 6.x from drupal.org. Unpack the files and upload them to your Drupal installation directory.
- 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.
- Run update.php by visiting
http://example.com/update.php(replace example.com with your Drupal installation's domain name and path.).
- Download and replace all non-core modules to their latest version for Drupal 6.x
- Enable your non-core modules and re-run update.php to update custom and contributed database tables.
- 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: example.com/admin/build/views/tools/convert (replace example.com with your domain name).
- Update your theme for 6.x compatibility, if you are using a custom or contributed theme, and enable it.
- Navigate to the Administration >> Content >> Post settings and click 'Rebuild permissions' button to rebuild the permission.
- Verify that your site is working correctly.
- Navigate to the Administration >> Site configuration >> Site maintenance page, set your website status to online mode, and save your settings.
- 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.