UPGRADE.txt 4.95 KB
Newer Older
1 2 3 4 5
// $Id$

UPGRADING
---------

6
Prior to upgrading, you should ensure that:
7

8 9
 * Your system meets or exceeds Drupal's minimum requirements as shown at
   http://drupal.org/requirements.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
 * You have a backup of all your relevant data (#1).
 * Custom and contributed modules have been checked for compatibility (#11).
 * Custom and contributed themes have been checked for compatibility (#11).
 * You have read through this entire document.

Let's begin!

1.  Backup your database and Drupal directory - especially your "sites"
    directory which contains your configuration file and added modules and
    themes, any contributed or custom modules in your "modules" directory,
    and your "files" directory which contains uploaded files. If other files
    have modifications, such as .htaccess or robots.txt, those should be
    backed up as well.

    Note: for a single site setup, the configuration file is the "settings.php"
    file located at sites/default/settings.php. The default.settings.php file
    contains a clean copy for restoration purposes, if required.

    For multisite configurations, the configuration file is located in a
    structure like the following:
30

31 32 33 34
      sites/default/settings.php
      sites/example.com/settings.php
      sites/sub.example.com/settings.php
      sites/sub.example.com.path/settings.php
35

36
    More information on multisite configuration is located in INSTALL.txt.
37

38 39 40 41 42 43
2.  If possible, log on either as a user with the "Administer software updates"
    permission or as the user with user ID 1, which is the first account
    created (also known as the site maintenance account). Only these accounts
    will be able to automatically access update.php in step #10. There are
    special instructions in step #10 if you are unable to log on as one of
    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 51
4.  If using a custom or contributed theme, switch
    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 60 61 62
8.  Copy your backed up "files" and "sites" directories 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 taken in step #1.
63

64
9.  Verify the new configuration file to make sure it has correct information.
65

66 67 68
10. Run update.php by visiting http://www.example.com/update.php (replace
    www.example.com with your Drupal installation's domain name and path). This
    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 75 76 77 78 79 80 81 82 83 84
      - There is a line that says $update_free_access = FALSE;
        Change it to $update_free_access = TRUE;

      - Once update.php is done, you must change the settings.php file
        back to its original form with $update_free_access = FALSE;

11. Ensure that the versions of all custom and contributed modules match the
    new Drupal version to which you have updated. For a major update, such as
    from 5.x to 6.x, modules from previous versions will not be compatible
    and updated versions will be required.

85
      - For contributed modules, check http://drupal.org/project/modules
86 87 88 89 90 91 92 93 94 95 96 97 98
        for the version of a module matching your version of Drupal.

      - For custom modules, review http://drupal.org/update/modules to
        ensure that a custom module is compatible with the current version.

12. Re-enable custom and contributed modules and re-run update.php
    to update custom and contributed database tables.

13. Return the site to its original theme (if you switched to a core
    theme like Garland or Bluemarine in step #4). If your site uses a
    custom or contributed theme, make sure it is compatible with your
    version of Drupal.

99
      - For contributed themes, check http://drupal.org/project/themes
100
        for the version of a theme matching your version of Drupal.
101

102 103
      - For custom themes, review http://drupal.org/update/theme to ensure
        that a custom theme is compatible with the current version.
104

105 106
14. Finally, return your site to "Online" mode so your visitors may resume
    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 111
For more information on upgrading visit
the Drupal handbook at http://drupal.org/upgrade