Knowledgebase

How to upgrade Drupal from version 6 to version 7

Here are the steps that you have to follow in order to upgrade your Drupal 6 to Drupal 7:

  • Before you start the upgrade to Drupal 7 make sure that your Drupal 6 is updated to the last stable Drupal 6 release. For more information on how to perform this minor update check out the respective article or the more detailed tutorial on updating Drupal.
  • Back up the database in which your Drupal is installed, as well as the Drupal files that are on your Drupal hosting account.
  • Put your site into maintenance mode. You can do that from the admin panel of your Drupal (administer>Site maintenance).
  • Check the third party/contributed modules and themes that are installed on your Drupal. Disable and uninstall those that you don't need.
  • Check whether the remaining modules and themes can be used with Drupal 7, meaning whether they have a Drupal 7 version. Download to your local computer the Drupal 7 versions of those contributed modules and themes that have such versions.
  • If some of your Drupal 6 contributed modules and themes don't have a Drupal 7 version, disable and uninstall them.
  • Check whether you have Drupal 6 contributed modules that are incorporated as part of the Drupal 7 core modules. You can find a list of such Drupal 6 contributed modules on the official Drupal site. Some of these modules have data in the database that has to be migrated, and there are many others that don't require any data transfer.
  • Disable and uninstall the Drupal 6 contributed modules that are part of the Drupal 7 core and that don't have any data which has to be transferred.
  • Disable (don't uninstall them) those Drupal 6 contributed modules which are part of the Drupal 7 core but that have information in the database which has to be migrated. The Drupal 7 versions of those modules should have a migration tool. One example of such module is the popular Content Construction Kit (CCK).
  • Make sure that all your Drupal 6 contributed modules that are still installed are updated to their newest Drupal 6 release. You can check from the Available updates report (administer>Reports>Available updates) or from the page of each module on the official Drupal site.
  • Remove the folders from your hosting account of all the modules and themes that you uninstalled. If your Drupal is installed directly in the public_html directory on your account, you can find them in public_html/sites/all/modules and public_html/sites/all/themes.
  • Disable all the Drupal 6 contributed modules. These are the modules that have a Drupal 7 version.
  • Set the default theme to Garland.
  • Remove all the files and folders from the root Drupal directory on your hosting account with the notable exception of the sites directory.
  • Download to your local computer the last stable Drupal 7 release. You can download it from the official Drupal site. Then unzip the archive that's on your local computer. It should contain a folder labeled drupal-7.x (x is the number of the release). In that folder are all the Drupal 7 files and folders.
  • Upload all the files and folders that are inside the folder drupal-7.x to the root Drupal directory on your account. You can do that with an FTP client.
  • With you internet browser run the update.php script (yourdomain.com/update.php). Just follow the instructions that are displayed on the page that opens. This will update the database.
  • Update the contributed modules and themes. To do this remove the folders for the modules and themes from your hosting account. Then unzip their Drupal 7 versions that you downloaded to your local computer, and upload the unzipped module and theme folders to the respective locations on your hosting account (e.g. public_html/sites/all/modules and public_html/sites/all/themes). After that enable the modules.
  • Migrate the data for those modules that require data migration. The Drupal 7 version of the CCK module, for example, has a migration tool that you can use to transfer the data.
  • Update the database again by running the update.php script.
  • Make sure that your site functions without any problems.
  • Disable the maintenance mode.
  • If you had put any directives manually in the .htaccess and robots.txt files, you have to put them again. Modifications to core files are also lost during the upgrade, so if you had any, you have to make them again.

For some more details you can also read the upgrading Drupal 6 to Drupal 7 tutorial.

Was this answer helpful?

 Print this Article

Also Read