Updating Drupal version 6

From Greenlivingpedia, a wiki on green living, building and energy

Revision as of 05:25, 12 June 2011 by Peter Campbell (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Drupal is an open source content management system popular for managing content on many websites. This article provides a summary of the steps to follow to update the Drupal version to the latest available. This ensures that your website has the benefit of all available security and bug fixes.

In the examples below http://www.example.com/ would be the address of your website.

Contents

[edit] 1. Prepare the Update

  • Download and unpack the latest Drupal 6.x to where you will upload or copy it from. It will create a folder called "drupal-6.[minor version]" with all the files and directories in it.

[edit] 2. Log in and put site Off-line

  • Log on as the user with user ID 1, which is the first account created and the main administrator account.
  • Do not close your browser until the final step is completed!
  • Place the site in "Off-line" mode. This option is at http://www.example.com/?q=admin/settings/site-maintenance.
  • Turn off all non-core modules. Don't forget to note which non-core modules you have enabled so you can re-enable them again after the update.

[edit] 3. Backup current site

  • Back up your database. You can use phpMyAdmin via CPanel provided by the web host. or you can install and use the Backup and Migrate module
  • Backup the "sites" directory and other files. The "sites" directory contains your configuration file, added modules and themes. It also contains contributed or custom modules in your "modules" directory,
  • Backup the "files" directory which contains uploaded files. Note that in later versions of Drupal 6.x this directory is within the Sites directory
  • Backup ".htaccess" or "robots.txt"

[edit] 4. Upload the new version

  • Use and FTP program (or the FireFTP extension in Firefox) to upload new Drupal files. These can be copied into a folder (e.g. "cms") on your web host.
  • Using FTP, replace the new cms\sites directory with your backed up version
  • Using FTP, add the cms\files directory using your backed up version
  • Copy ".htaccess" and "robots.txt" from your backed up version

[edit] 5. Run the update program

  • Run update.php by visiting http://www.example.com/cms/update.php. This step will update the core database tables to the new Drupal installation.
    • Note: if you are unable to access update.php, follow these steps:
      • Using a text editor, open your settings.php file.
      • Find the line that says $update_free_access = FALSE;
      • Change that line to $update_free_access = TRUE;
      • Run update.php by visiting http://www.example.com/cms/update.php.

[edit] 6. After the update

  • Change the settings.php file back to its original form with $update_free_access = FALSE;
  • Re-enable your non-core modules and run update.php again.
  • Return your site to "Online" mode so your visitors may resume browsing. This option is available in the administration screens at http://www.example.com/?q=admin/settings/site-maintenance.

[edit] External links

Personal tools