UPGRADE.txt 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. INTRODUCTION
  2. ------------
  3. This document describes how to:
  4. * Update your Drupal site from one minor 7.x version to another minor 7.x
  5. version; for example, from 7.8 to 7.9, or from 7.6 to 7.10.
  6. * Upgrade your Drupal site's major version from 6.x to 7.x.
  7. First steps and definitions:
  8. * If you are upgrading to Drupal version x.y, then x is known as the major
  9. version number, and y is known as the minor version number. The download
  10. file will be named drupal-x.y.tar.gz (or drupal-x.y.zip).
  11. * All directories mentioned in this document are relative to the directory of
  12. your Drupal installation.
  13. * Make a full backup of all files, directories, and your database(s) before
  14. starting, and save it outside your Drupal installation directory.
  15. Instructions may be found at http://drupal.org/upgrade/backing-up-the-db
  16. * It is wise to try an update or upgrade on a test copy of your site before
  17. applying it to your live site. Even minor updates can cause your site's
  18. behavior to change.
  19. * Each new release of Drupal has release notes, which explain the changes made
  20. since the previous version and any special instructions needed to update or
  21. upgrade to the new version. You can find a link to the release notes for the
  22. version you are upgrading or updating to on the Drupal project page
  23. (http://drupal.org/project/drupal).
  24. UPGRADE PROBLEMS
  25. ----------------
  26. If you encounter errors during this process,
  27. * Note any error messages you see.
  28. * Restore your site to its previous state, using the file and database backups
  29. you created before you started the upgrade process. Do not attempt to do
  30. further upgrades on a site that had update problems.
  31. * Consult one of the support options listed on http://drupal.org/support
  32. More in-depth information on upgrading can be found at http://drupal.org/upgrade
  33. MINOR VERSION UPDATES
  34. ---------------------
  35. To update from one minor 7.x version of Drupal to any later 7.x version, after
  36. following the instructions in the INTRODUCTION section at the top of this file:
  37. 1. Log in as a user with the permission "Administer software updates".
  38. 2. Go to Administration > Configuration > Development > Maintenance mode.
  39. Enable the "Put site into maintenance mode" checkbox and save the
  40. configuration.
  41. 3. Remove all old core files and directories, except for the 'sites' directory
  42. and any custom files you added elsewhere.
  43. If you made modifications to files like .htaccess or robots.txt, you will
  44. need to re-apply them from your backup, after the new files are in place.
  45. Sometimes an update includes changes to default.settings.php (this will be
  46. noted in the release notes). If that's the case, follow these steps:
  47. - Make a backup copy of your settings.php file, with a different file name.
  48. - Make a copy of the new default.settings.php file, and name the copy
  49. settings.php (overwriting your previous settings.php file).
  50. - Copy the custom and site-specific entries from the backup you made into the
  51. new settings.php file. You will definitely need the lines giving the
  52. database information, and you will also want to copy in any other
  53. customizations you have added.
  54. 4. Download the latest Drupal 7.x release from http://drupal.org to a
  55. directory outside of your web root. Extract the archive and copy the files
  56. into your Drupal directory.
  57. On a typical Unix/Linux command line, use the following commands to download
  58. and extract:
  59. wget http://drupal.org/files/projects/drupal-x.y.tar.gz
  60. tar -zxvf drupal-x.y.tar.gz
  61. This creates a new directory drupal-x.y/ containing all Drupal files and
  62. directories. Copy the files into your Drupal installation directory:
  63. cp -R drupal-x.y/* drupal-x.y/.htaccess /path/to/your/installation
  64. If you do not have command line access to your server, download the archive
  65. from http://drupal.org using your web browser, extract it, and then use an
  66. FTP client to upload the files to your web root.
  67. 5. Re-apply any modifications to files such as .htaccess or robots.txt.
  68. 6. Run update.php by visiting http://www.example.com/update.php (replace
  69. www.example.com with your domain name). This will update the core database
  70. tables.
  71. If you are unable to access update.php do the following:
  72. - Open settings.php with a text editor.
  73. - Find the line that says:
  74. $update_free_access = FALSE;
  75. - Change it into:
  76. $update_free_access = TRUE;
  77. - Once the upgrade is done, $update_free_access must be reverted to FALSE.
  78. 7. Go to Administration > Reports > Status report. Verify that everything is
  79. working as expected.
  80. 8. Ensure that $update_free_access is FALSE in settings.php.
  81. 9. Go to Administration > Configuration > Development > Maintenance mode.
  82. Disable the "Put site into maintenance mode" checkbox and save the
  83. configuration.
  84. MAJOR VERSION UPGRADE
  85. ---------------------
  86. To upgrade from a previous major version of Drupal to Drupal 7.x, after
  87. following the instructions in the INTRODUCTION section at the top of this file:
  88. 1. Check on the Drupal 7 status of your contributed and custom modules and
  89. themes. See http://drupal.org/node/948216 for information on upgrading
  90. contributed modules and themes. See http://drupal.org/node/895314 for a list
  91. of modules that have been moved into core for Drupal 7, and instructions on
  92. how to update them. See http://drupal.org/update/modules for information on
  93. how to update your custom modules, and http://drupal.org/update/theme for
  94. custom themes.
  95. You may decide at this point that you cannot upgrade your site, because
  96. needed modules or themes are not ready for Drupal 7.
  97. 2. Update to the latest available version of Drupal 6.x (if your current version
  98. is Drupal 5.x, you have to upgrade to 6.x first). If you need to update,
  99. download Drupal 6.x and follow the instructions in its UPGRADE.txt. This
  100. document only applies for upgrades from 6.x to 7.x.
  101. 3. In addition to updating to the latest available version of Drupal 6.x core,
  102. you must also upgrade all of your contributed modules for Drupal to their
  103. latest Drupal 6.x versions.
  104. 4. Log in as user ID 1 (the site maintenance user).
  105. 5. Go to Administer > Site configuration > Site maintenance. Select
  106. "Off-line" and save the configuration.
  107. 6. Go to Administer > Site building > Themes. Enable "Garland" and select it as
  108. the default theme.
  109. 7. Go to Administer > Site building > Modules. Disable all modules that are not
  110. listed under "Core - required" or "Core - optional". It is possible that some
  111. modules cannot be disabled, because others depend on them. Repeat this step
  112. until all non-core modules are disabled.
  113. If you know that you will not re-enable some modules for Drupal 7.x and you
  114. no longer need their data, then you can uninstall them under the Uninstall
  115. tab after disabling them.
  116. 8. On the command line or in your FTP client, remove the file
  117. sites/default/default.settings.php
  118. 9. Remove all old core files and directories, except for the 'sites' directory
  119. and any custom files you added elsewhere.
  120. If you made modifications to files like .htaccess or robots.txt, you will
  121. need to re-apply them from your backup, after the new files are in place.
  122. 10. If you uninstalled any modules, remove them from the sites/all/modules and
  123. other sites/*/modules directories. Leave other modules in place, even though
  124. they are incompatible with Drupal 7.x.
  125. 11. Download the latest Drupal 7.x release from http://drupal.org to a
  126. directory outside of your web root. Extract the archive and copy the files
  127. into your Drupal directory.
  128. On a typical Unix/Linux command line, use the following commands to download
  129. and extract:
  130. wget http://drupal.org/files/projects/drupal-x.y.tar.gz
  131. tar -zxvf drupal-x.y.tar.gz
  132. This creates a new directory drupal-x.y/ containing all Drupal files and
  133. directories. Copy the files into your Drupal installation directory:
  134. cp -R drupal-x.y/* drupal-x.y/.htaccess /path/to/your/installation
  135. If you do not have command line access to your server, download the archive
  136. from http://drupal.org using your web browser, extract it, and then use an
  137. FTP client to upload the files to your web root.
  138. 12. Re-apply any modifications to files such as .htaccess or robots.txt.
  139. 13. Make your settings.php file writeable, so that the update process can
  140. convert it to the format of Drupal 7.x. settings.php is usually located in
  141. sites/default/settings.php
  142. 14. Run update.php by visiting http://www.example.com/update.php (replace
  143. www.example.com with your domain name). This will update the core database
  144. tables.
  145. If you are unable to access update.php do the following:
  146. - Open settings.php with a text editor.
  147. - Find the line that says:
  148. $update_free_access = FALSE;
  149. - Change it into:
  150. $update_free_access = TRUE;
  151. - Once the upgrade is done, $update_free_access must be reverted to FALSE.
  152. 15. Backup your database after the core upgrade has run.
  153. 16. Replace and update your non-core modules and themes, following the
  154. procedures at http://drupal.org/node/948216
  155. 17. Go to Administration > Reports > Status report. Verify that everything is
  156. working as expected.
  157. 18. Ensure that $update_free_access is FALSE in settings.php.
  158. 19. Go to Administration > Configuration > Development > Maintenance mode.
  159. Disable the "Put site into maintenance mode" checkbox and save the
  160. configuration.
  161. To get started with Drupal 7 administration, visit
  162. http://drupal.org/getting-started/7/admin