Newer
Older

Dries Buytaert
committed
INTRODUCTION
------------
This document describes how to:

Dries Buytaert
committed

Dries Buytaert
committed
* Update your Drupal site from one minor 8.x version to another minor 8.x
version; for example, from 8.8 to 8.9, or from 8.6 to 8.10.

Dries Buytaert
committed

Dries Buytaert
committed
* Upgrade your Drupal site's major version from 7.x to 8.x.

Gábor Hojtsy
committed

Dries Buytaert
committed
First steps and definitions:

Dries Buytaert
committed
* If you are upgrading to Drupal version x.y, then x is known as the major
version number, and y is known as the minor version number. The download

Dries Buytaert
committed
file will be named drupal-x.y.tar.gz (or drupal-x.y.zip).

Gábor Hojtsy
committed
* All directories mentioned in this document are relative to the directory of
your Drupal installation.

Gábor Hojtsy
committed

Dries Buytaert
committed
* Make a full backup of all files, directories, and your database(s) before
starting, and save it outside your Drupal installation directory.
Instructions may be found at http://drupal.org/upgrade/backing-up-the-db
* It is wise to try an update or upgrade on a test copy of your site before
applying it to your live site. Even minor updates can cause your site's
behavior to change.

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

Dries Buytaert
committed

Dries Buytaert
committed
UPGRADE PROBLEMS
----------------
If you encounter errors during this process,

Dries Buytaert
committed

Dries Buytaert
committed
* Note any error messages you see.

Dries Buytaert
committed

Dries Buytaert
committed
* Restore your site to its previous state, using the file and database backups
you created before you started the upgrade process. Do not attempt to do
further upgrades on a site that had update problems.
* Consult one of the support options listed on http://drupal.org/support

Dries Buytaert
committed

Dries Buytaert
committed
More in-depth information on upgrading can be found at http://drupal.org/upgrade

Dries Buytaert
committed
MINOR VERSION UPDATES
---------------------

Dries Buytaert
committed
To update from one minor 8.x version of Drupal to any later 8.x version, after

Dries Buytaert
committed
following the instructions in the INTRODUCTION section at the top of this file:

Dries Buytaert
committed
1. Log in as a user with the permission "Administer software updates".
2. Go to Administration > Configuration > Development > Maintenance mode.

Dries Buytaert
committed
Enable the "Put site into maintenance mode" checkbox and save the
configuration.
3. Remove all old core files and directories, except for the 'sites' directory

Dries Buytaert
committed
and any custom files you added elsewhere.

Dries Buytaert
committed
If you made modifications to files like .htaccess or robots.txt, you will
need to re-apply them from your backup, after the new files are in place.
Sometimes an update includes changes to default.settings.php (this will be
noted in the release notes). If that's the case, follow these steps:
- Make a backup copy of your settings.php file, with a different file name.
- Make a copy of the new default.settings.php file, and name the copy
settings.php (overwriting your previous settings.php file).
- Copy the custom and site-specific entries from the backup you made into the
new settings.php file. You will definitely need the lines giving the
database information, and you will also want to copy in any other
customizations you have added.

Dries Buytaert
committed
4. Download the latest Drupal 8.x release from http://drupal.org to a

Dries Buytaert
committed
directory outside of your web root. Extract the archive and copy the files
into your Drupal directory.

Dries Buytaert
committed
On a typical Unix/Linux command line, use the following commands to download
and extract:

Gábor Hojtsy
committed

Dries Buytaert
committed
wget http://drupal.org/files/projects/drupal-x.y.tar.gz
tar -zxvf drupal-x.y.tar.gz

Gábor Hojtsy
committed

Dries Buytaert
committed
This creates a new directory drupal-x.y/ containing all Drupal files and
directories. Copy the files into your Drupal installation directory:

Gábor Hojtsy
committed

Dries Buytaert
committed
cp -R drupal-x.y/* drupal-x.y/.htaccess /path/to/your/installation

Gábor Hojtsy
committed

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

Gábor Hojtsy
committed

Dries Buytaert
committed
5. Re-apply any modifications to files such as .htaccess or robots.txt.

Gábor Hojtsy
committed

Nate Lampton
committed
6. Run update.php by visiting http://www.example.com/core/update.php (replace

Dries Buytaert
committed
www.example.com with your domain name). This will update the core database
tables.

Gábor Hojtsy
committed

Dries Buytaert
committed
If you are unable to access update.php do the following:

Dries Buytaert
committed
- Open settings.php with a text editor.
- Find the line that says:

Jennifer Hodgdon
committed
$settings['update_free_access'] = FALSE;

Dries Buytaert
committed
- Change it into:

Jennifer Hodgdon
committed
$settings['update_free_access'] = TRUE;

Dries Buytaert
committed

Jennifer Hodgdon
committed
- Once the upgrade is done, $settings['update_free_access'] must be
reverted to FALSE.

Dries Buytaert
committed
7. Go to Administration > Reports > Status report. Verify that everything is
working as expected.

Dries Buytaert
committed

Jennifer Hodgdon
committed
8. Ensure that $settings['update_free_access'] is FALSE in settings.php.

Dries Buytaert
committed
9. Go to Administration > Configuration > Development > Maintenance mode.

Dries Buytaert
committed
Disable the "Put site into maintenance mode" checkbox and save the
configuration.
MAJOR VERSION UPGRADE
---------------------

Dries Buytaert
committed
To upgrade from a previous major version of Drupal to Drupal 8.x, after

Dries Buytaert
committed
following the instructions in the INTRODUCTION section at the top of this file:

Dries Buytaert
committed
1. Check on the Drupal 8 status of your contributed and custom modules and
themes. See http://drupal.org/node/948216 for information on upgrading
contributed modules and themes. See http://drupal.org/node/895314 for a list

Dries Buytaert
committed
of modules that have been moved into core for Drupal 8, and instructions on
how to update them. See http://drupal.org/update/modules for information on
how to update your custom modules, and http://drupal.org/update/theme for
custom themes.

Dries Buytaert
committed

Dries Buytaert
committed
You may decide at this point that you cannot upgrade your site because

Dries Buytaert
committed
needed modules or themes are not ready for Drupal 8

Dries Buytaert
committed

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

Dries Buytaert
committed

Dries Buytaert
committed
3. In addition to updating to the latest available version of Drupal 7.x core,
you must also upgrade all of your contributed modules for Drupal to their
latest Drupal 7.x versions.

Dries Buytaert
committed

Dries Buytaert
committed
4. Log in as user ID 1 (the site maintenance user).
5. Go to Administer > Site configuration > Site maintenance. Select
"Off-line" and save the configuration.

Dries Buytaert
committed

Dries Buytaert
committed
6. Go to Administer > Site building > Themes. Enable "Bartik" and select it as

Dries Buytaert
committed

Dries Buytaert
committed
7. Go to Administer > Site building > Modules. Disable all modules that are not

Dries Buytaert
committed
listed under "Core - required" or "Core - optional". It is possible that some

Dries Buytaert
committed
modules cannot be disabled because others depend on them. Repeat this step

Dries Buytaert
committed
until all non-core modules are disabled.

Dries Buytaert
committed
If you know that you will not re-enable some modules for Drupal 8.x and you
no longer need their data, then you can uninstall them under the Uninstall
tab after disabling them.

Dries Buytaert
committed

Dries Buytaert
committed
8. On the command line or in your FTP client, remove the file

Dries Buytaert
committed
sites/default/default.settings.php

Dries Buytaert
committed
9. Remove all old core files and directories, except for the 'sites' directory

Dries Buytaert
committed
and any custom files you added elsewhere.
If you made modifications to files like .htaccess or robots.txt, you will
need to re-apply them from your backup, after the new files are in place.
10. If you uninstalled any modules, remove them from the /modules and other
sites/*/modules directories. Leave other modules in place, even though they
are incompatible with Drupal 8.x.

Dries Buytaert
committed

Dries Buytaert
committed
11. Download the latest Drupal 8.x release from http://drupal.org to a

Dries Buytaert
committed
directory outside of your web root. Extract the archive and copy the files
into your Drupal directory.
On a typical Unix/Linux command line, use the following commands to download
and extract:
wget http://drupal.org/files/projects/drupal-x.y.tar.gz
tar -zxvf drupal-x.y.tar.gz
This creates a new directory drupal-x.y/ containing all Drupal files and
directories. Copy the files into your Drupal installation directory:
cp -R drupal-x.y/* drupal-x.y/.htaccess /path/to/your/installation
If you do not have command line access to your server, download the archive
from http://drupal.org using your web browser, extract it, and then use an
FTP client to upload the files to your web root.

Dries Buytaert
committed
12. Re-apply any modifications to files such as .htaccess or robots.txt.

Dries Buytaert
committed

Dries Buytaert
committed
13. Make your settings.php file writeable, so that the update process can

Dries Buytaert
committed
convert it to the format of Drupal 8.x. settings.php is usually located in

Dries Buytaert
committed
sites/default/settings.php

Dries Buytaert
committed
14. Run update.php by visiting http://www.example.com/core/update.php (replace

Dries Buytaert
committed
www.example.com with your domain name). This will update the core database
tables.
If you are unable to access update.php do the following:
- Open settings.php with a text editor.
- Find the line that says:

Jennifer Hodgdon
committed
$settings['update_free_access'] = FALSE;

Dries Buytaert
committed
- Change it into:

Jennifer Hodgdon
committed
$settings['update_free_access'] = TRUE;

Dries Buytaert
committed

Jennifer Hodgdon
committed
- Once the upgrade is done, $settings['update_free_access'] must be
reverted to FALSE.

Dries Buytaert
committed

Dries Buytaert
committed
15. Backup your database after the core upgrade has run.

Dries Buytaert
committed

Dries Buytaert
committed
16. Replace and update your non-core modules and themes, following the
procedures at http://drupal.org/node/948216

Dries Buytaert
committed

Dries Buytaert
committed
17. Go to Administration > Reports > Status report. Verify that everything is

Dries Buytaert
committed

Jennifer Hodgdon
committed
18. Ensure that $settings['update_free_access'] is FALSE in settings.php.

Dries Buytaert
committed

Dries Buytaert
committed
19. Go to Administration > Configuration > Development > Maintenance mode.

Dries Buytaert
committed
Disable the "Put site into maintenance mode" checkbox and save the
configuration.
To get started with Drupal 8 administration, visit

Dries Buytaert
committed
http://drupal.org/getting-started/7/admin