Project

General

Profile

Paste
Download (9.89 KB) Statistics
| Branch: | Revision:

root / drupal7 / UPGRADE.txt @ master

1
INTRODUCTION
2
------------
3
This document describes how to:
4

    
5
  * Update your Drupal site from one minor 7.x version to another minor 7.x
6
    version; for example, from 7.8 to 7.9, or from 7.6 to 7.10.
7

    
8
  * Upgrade your Drupal site's major version from 6.x to 7.x.
9

    
10
First steps and definitions:
11

    
12
  * If you are upgrading to Drupal version x.y, then x is known as the major
13
    version number, and y is known as the minor version number. The download
14
    file will be named drupal-x.y.tar.gz (or drupal-x.y.zip).
15

    
16
  * All directories mentioned in this document are relative to the directory of
17
    your Drupal installation.
18

    
19
  * Make a full backup of all files, directories, and your database(s) before
20
    starting, and save it outside your Drupal installation directory.
21
    Instructions may be found at http://drupal.org/upgrade/backing-up-the-db
22

    
23
  * It is wise to try an update or upgrade on a test copy of your site before
24
    applying it to your live site. Even minor updates can cause your site's
25
    behavior to change.
26

    
27
  * Each new release of Drupal has release notes, which explain the changes made
28
    since the previous version and any special instructions needed to update or
29
    upgrade to the new version. You can find a link to the release notes for the
30
    version you are upgrading or updating to on the Drupal project page
31
    (http://drupal.org/project/drupal).
32

    
33
UPGRADE PROBLEMS
34
----------------
35
If you encounter errors during this process,
36

    
37
  * Note any error messages you see.
38

    
39
  * Restore your site to its previous state, using the file and database backups
40
    you created before you started the upgrade process. Do not attempt to do
41
    further upgrades on a site that had update problems.
42

    
43
  * Consult one of the support options listed on http://drupal.org/support
44

    
45
More in-depth information on upgrading can be found at http://drupal.org/upgrade
46

    
47
MINOR VERSION UPDATES
48
---------------------
49
To update from one minor 7.x version of Drupal to any later 7.x version, after
50
following the instructions in the INTRODUCTION section at the top of this file:
51

    
52
1. Log in as a user with the permission "Administer software updates".
53

    
54
2. Go to Administration > Configuration > Development > Maintenance mode.
55
   Enable the "Put site into maintenance mode" checkbox and save the
56
   configuration.
57

    
58
3. Remove all old core files and directories, except for the 'sites' directory
59
   and any custom files you added elsewhere.
60

    
61
   If you made modifications to files like .htaccess or robots.txt, you will
62
   need to re-apply them from your backup, after the new files are in place.
63

    
64
   Sometimes an update includes changes to default.settings.php (this will be
65
   noted in the release notes). If that's the case, follow these steps:
66

    
67
   - Locate your settings.php file in the /sites/* directory. (Typically
68
     sites/default.)
69

    
70
   - Make a backup copy of your settings.php file, with a different file name.
71

    
72
   - Make a copy of the new default.settings.php file, and name the copy
73
     settings.php (overwriting your previous settings.php file).
74

    
75
   - Copy the custom and site-specific entries from the backup you made into the
76
     new settings.php file. You will definitely need the lines giving the
77
     database information, and you will also want to copy in any other
78
     customizations you have added.
79

    
80
   You can find the release notes for your version at
81
   https://www.drupal.org/project/drupal. At bottom of the project page under
82
   "Downloads" use the link for your version of Drupal to view the release
83
   notes. If your version is not listed, use the 'View all releases' link. From
84
   this page you can scroll down or use the filter to find your version and its
85
   release notes.
86

    
87
4. Download the latest Drupal 7.x release from http://drupal.org to a
88
   directory outside of your web root. Extract the archive and copy the files
89
   into your Drupal directory.
90

    
91
   On a typical Unix/Linux command line, use the following commands to download
92
   and extract:
93

    
94
     wget http://drupal.org/files/projects/drupal-x.y.tar.gz
95
     tar -zxvf drupal-x.y.tar.gz
96

    
97
   This creates a new directory drupal-x.y/ containing all Drupal files and
98
   directories. Copy the files into your Drupal installation directory:
99

    
100
     cp -R drupal-x.y/* drupal-x.y/.htaccess /path/to/your/installation
101

    
102
   If you do not have command line access to your server, download the archive
103
   from http://drupal.org using your web browser, extract it, and then use an
104
   FTP client to upload the files to your web root.
105

    
106
5. Re-apply any modifications to files such as .htaccess or robots.txt.
107

    
108
6. Run update.php by visiting http://www.example.com/update.php (replace
109
   www.example.com with your domain name). This will update the core database
110
   tables.
111

    
112
   If you are unable to access update.php do the following:
113

    
114
   - Open settings.php with a text editor.
115

    
116
   - Find the line that says:
117
     $update_free_access = FALSE;
118

    
119
   - Change it into:
120
     $update_free_access = TRUE;
121

    
122
   - Once the upgrade is done, $update_free_access must be reverted to FALSE.
123

    
124
7. Go to Administration > Reports > Status report. Verify that everything is
125
   working as expected.
126

    
127
8. Ensure that $update_free_access is FALSE in settings.php.
128

    
129
9. Go to Administration > Configuration > Development > Maintenance mode.
130
   Disable the "Put site into maintenance mode" checkbox and save the
131
   configuration.
132

    
133
MAJOR VERSION UPGRADE
134
---------------------
135
To upgrade from a previous major version of Drupal to Drupal 7.x, after
136
following the instructions in the INTRODUCTION section at the top of this file:
137

    
138
1. Check on the Drupal 7 status of your contributed and custom modules and
139
   themes. See http://drupal.org/node/948216 for information on upgrading
140
   contributed modules and themes. See http://drupal.org/node/895314 for a list
141
   of modules that have been moved into core for Drupal 7, and instructions on
142
   how to update them. See http://drupal.org/update/modules for information on
143
   how to update your custom modules, and http://drupal.org/update/theme for
144
   custom themes.
145

    
146
   You may decide at this point that you cannot upgrade your site, because
147
   needed modules or themes are not ready for Drupal 7.
148

    
149
2. Update to the latest available version of Drupal 6.x (if your current version
150
   is Drupal 5.x, you have to upgrade to 6.x first). If you need to update,
151
   download Drupal 6.x and follow the instructions in its UPGRADE.txt. This
152
   document only applies for upgrades from 6.x to 7.x.
153

    
154
3. In addition to updating to the latest available version of Drupal 6.x core,
155
   you must also upgrade all of your contributed modules for Drupal to their
156
   latest Drupal 6.x versions.
157

    
158
4. Log in as user ID 1 (the site maintenance user).
159

    
160
5. Go to Administer > Site configuration > Site maintenance. Select
161
   "Off-line" and save the configuration.
162

    
163
6. Go to Administer > Site building > Themes. Enable "Garland" and select it as
164
   the default theme.
165

    
166
7. Go to Administer > Site building > Modules. Disable all modules that are not
167
   listed under "Core - required" or "Core - optional". It is possible that some
168
   modules cannot be disabled, because others depend on them. Repeat this step
169
   until all non-core modules are disabled.
170

    
171
   If you know that you will not re-enable some modules for Drupal 7.x and you
172
   no longer need their data, then you can uninstall them under the Uninstall
173
   tab after disabling them.
174

    
175
8. On the command line or in your FTP client, remove the file
176

    
177
     sites/default/default.settings.php
178

    
179
9. Remove all old core files and directories, except for the 'sites' directory
180
   and any custom files you added elsewhere.
181

    
182
   If you made modifications to files like .htaccess or robots.txt, you will
183
   need to re-apply them from your backup, after the new files are in place.
184

    
185
10. If you uninstalled any modules, remove them from the sites/all/modules and
186
   other sites/*/modules directories. Leave other modules in place, even though
187
   they are incompatible with Drupal 7.x.
188

    
189
11. Download the latest Drupal 7.x release from http://drupal.org to a
190
   directory outside of your web root. Extract the archive and copy the files
191
   into your Drupal directory.
192

    
193
   On a typical Unix/Linux command line, use the following commands to download
194
   and extract:
195

    
196
     wget http://drupal.org/files/projects/drupal-x.y.tar.gz
197
     tar -zxvf drupal-x.y.tar.gz
198

    
199
   This creates a new directory drupal-x.y/ containing all Drupal files and
200
   directories. Copy the files into your Drupal installation directory:
201

    
202
     cp -R drupal-x.y/* drupal-x.y/.htaccess /path/to/your/installation
203

    
204
   If you do not have command line access to your server, download the archive
205
   from http://drupal.org using your web browser, extract it, and then use an
206
   FTP client to upload the files to your web root.
207

    
208
12. Re-apply any modifications to files such as .htaccess or robots.txt.
209

    
210
13. Make your settings.php file writeable, so that the update process can
211
   convert it to the format of Drupal 7.x. settings.php is usually located in
212

    
213
     sites/default/settings.php
214

    
215
14. Run update.php by visiting http://www.example.com/update.php (replace
216
   www.example.com with your domain name). This will update the core database
217
   tables.
218

    
219
   If you are unable to access update.php do the following:
220

    
221
   - Open settings.php with a text editor.
222

    
223
   - Find the line that says:
224
     $update_free_access = FALSE;
225

    
226
   - Change it into:
227
     $update_free_access = TRUE;
228

    
229
   - Once the upgrade is done, $update_free_access must be reverted to FALSE.
230

    
231
15. Backup your database after the core upgrade has run.
232

    
233
16. Replace and update your non-core modules and themes, following the
234
   procedures at http://drupal.org/node/948216
235

    
236
17. Go to Administration > Reports > Status report. Verify that everything is
237
   working as expected.
238

    
239
18. Ensure that $update_free_access is FALSE in settings.php.
240

    
241
19. Go to Administration > Configuration > Development > Maintenance mode.
242
   Disable the "Put site into maintenance mode" checkbox and save the
243
   configuration.
244

    
245
To get started with Drupal 7 administration, visit
246
http://drupal.org/getting-started/7/admin