| 1 |
// $Id: UPGRADE.txt,v 1.16 2009/09/14 07:33:55 dries Exp $
|
| 2 |
|
| 3 |
UPGRADING
|
| 4 |
---------
|
| 5 |
|
| 6 |
Prior to upgrading, you should ensure that:
|
| 7 |
|
| 8 |
* Your system meets or exceeds Drupal's minimum requirements as shown at
|
| 9 |
http://drupal.org/requirements.
|
| 10 |
* You have a backup of all your relevant data (#1).
|
| 11 |
* Custom and contributed modules have been checked for compatibility (#11).
|
| 12 |
* Custom and contributed themes have been checked for compatibility (#11).
|
| 13 |
* You have read through this entire document.
|
| 14 |
|
| 15 |
Let's begin!
|
| 16 |
|
| 17 |
1. Backup your database and Drupal directory - especially your "sites"
|
| 18 |
directory which contains your configuration file and added modules and
|
| 19 |
themes, any contributed or custom modules in your "modules" directory,
|
| 20 |
and your "files" directory which contains uploaded files. If other files
|
| 21 |
have modifications, such as .htaccess or robots.txt, those should be
|
| 22 |
backed up as well.
|
| 23 |
|
| 24 |
Note: for a single site setup, the configuration file is the "settings.php"
|
| 25 |
file located at sites/default/settings.php. The default.settings.php file
|
| 26 |
contains a clean copy for restoration purposes, if required.
|
| 27 |
|
| 28 |
For multisite configurations, the configuration file is located in a
|
| 29 |
structure like the following:
|
| 30 |
|
| 31 |
sites/default/settings.php
|
| 32 |
sites/example.com/settings.php
|
| 33 |
sites/sub.example.com/settings.php
|
| 34 |
sites/sub.example.com.path/settings.php
|
| 35 |
|
| 36 |
More information on multisite configuration is located in INSTALL.txt.
|
| 37 |
|
| 38 |
2. If possible, log on either as a user with the "Administer software updates"
|
| 39 |
permission or as the user with user ID 1, which is the first account
|
| 40 |
created (also known as the site maintenance account). Only these accounts
|
| 41 |
will be able to automatically access update.php in step #10. There are
|
| 42 |
special instructions in step #10 if you are unable to log on as one of
|
| 43 |
these users. Do not close your browser until the final step is complete.
|
| 44 |
|
| 45 |
3. Place the site in "Offline" mode, to let the database updates run without
|
| 46 |
interruption and avoid displaying errors to end users of the site. This
|
| 47 |
option is at http://www.example.com/?q=admin/config/development/maintenance
|
| 48 |
(replace www.example.com with your installation's domain name and path).
|
| 49 |
|
| 50 |
4. If using a custom or contributed theme, switch
|
| 51 |
to a core theme, such as Garland or Bluemarine.
|
| 52 |
|
| 53 |
5. Disable all custom and contributed modules.
|
| 54 |
|
| 55 |
6. Remove all old files and directories from the Drupal installation directory.
|
| 56 |
|
| 57 |
7. Unpack the new files and directories into the Drupal installation directory.
|
| 58 |
|
| 59 |
8. Copy your backed up "files" and "sites" directories to the Drupal
|
| 60 |
installation directory. If other system files such as .htaccess or
|
| 61 |
robots.txt were customized, re-create the modifications in the new
|
| 62 |
versions of the files using the backups taken in step #1.
|
| 63 |
|
| 64 |
9. Verify the new configuration file to make sure it has correct information.
|
| 65 |
|
| 66 |
10. Run update.php by visiting http://www.example.com/update.php (replace
|
| 67 |
www.example.com with your Drupal installation's domain name and path). This
|
| 68 |
step will update the core database tables to the new Drupal installation.
|
| 69 |
|
| 70 |
Note: if you are unable to access update.php do the following:
|
| 71 |
|
| 72 |
- Open your settings.php with a text editor.
|
| 73 |
|
| 74 |
- There is a line that says $update_free_access = FALSE;
|
| 75 |
Change it to $update_free_access = TRUE;
|
| 76 |
|
| 77 |
- Once update.php is done, you must change the settings.php file
|
| 78 |
back to its original form with $update_free_access = FALSE;
|
| 79 |
|
| 80 |
11. Ensure that the versions of all custom and contributed modules match the
|
| 81 |
new Drupal version to which you have updated. For a major update, such as
|
| 82 |
from 5.x to 6.x, modules from previous versions will not be compatible
|
| 83 |
and updated versions will be required.
|
| 84 |
|
| 85 |
- For contributed modules, check http://drupal.org/project/modules
|
| 86 |
for the version of a module matching your version of Drupal.
|
| 87 |
|
| 88 |
- For custom modules, review http://drupal.org/update/modules to
|
| 89 |
ensure that a custom module is compatible with the current version.
|
| 90 |
|
| 91 |
12. Re-enable custom and contributed modules and re-run update.php
|
| 92 |
to update custom and contributed database tables.
|
| 93 |
|
| 94 |
13. Return the site to its original theme (if you switched to a core
|
| 95 |
theme like Garland or Bluemarine in step #4). If your site uses a
|
| 96 |
custom or contributed theme, make sure it is compatible with your
|
| 97 |
version of Drupal.
|
| 98 |
|
| 99 |
- For contributed themes, check http://drupal.org/project/themes
|
| 100 |
for the version of a theme matching your version of Drupal.
|
| 101 |
|
| 102 |
- For custom themes, review http://drupal.org/update/theme to ensure
|
| 103 |
that a custom theme is compatible with the current version.
|
| 104 |
|
| 105 |
14. Finally, return your site to "Online" mode so your visitors may resume
|
| 106 |
browsing. As in step #3, this option is available in your administration
|
| 107 |
screens at http://www.example.com/?q=admin/config/development/maintenance
|
| 108 |
(replace www.example.com with your installation's domain name and path).
|
| 109 |
|
| 110 |
For more information on upgrading visit
|
| 111 |
the Drupal handbook at http://drupal.org/upgrade
|