Upgrade Drupal

Edge for Private Cloud v4.18.05

In an Edge for Private Cloud installation of Apigee Developer Services portal (or simply, the portal), you might get a notification that a new version of Drupal is available. A new version can mean a Drupal feature release, patch, security update, or other type of Drupal update. In the case of a security update, you want to upgrade your installation of Drupal as soon as possible to ensure that your site remains secure.

The procedure below describes how to update a Private Cloud installation of Drupal 7.x.y to another minor version (for example Drupal 7.54 to 7.56).

Please note the following:

  • This procedure only updates your installation of Drupal. It does not update the Apigee software that ships as part of the portal. For information on upgrading the Apigee portal software, see Upgrade the portal.

  • You have to run Drush commands from the root directory of the portal site. By default, the portal is installed at:
    • /opt/apigee/apigee-drupal/wwwroot (Nginx)
    • /var/www/html (Apache)
    The procedure below assumes an Nginx server installation at the default location above.

Determining your current Drupal version

Before you start the Drupal update, you can determine your current Drupal version by running the following command from the Drupal installation folder. By default, Drupal is installed in /opt/apigee/apigee-drupal/wwwroot:

cd /opt/apigee/apigee-drupal/wwwroot
drush status | grep 'Drupal version'

You should see output in the form:

Drupal version          :  7.54

If you installed Drupal in a directory other than /opt/apigee/apigee-drupal/wwwroot, make sure to change to that directory before running the drush command.

Updating the Drupal version

This section describes how to use Drush (Drupal Shell) from a command line to update your Drupal version. See also, Updating Drupal Using Drush in the Drupal documentation.

To update your Drupal installation:

  1. Change to the /opt/apigee/apigee-drupal/wwwroot directory, or the directory where you installed the portal.
  2. Make a full backup of all files, directories, and databases. Save the backup in a location outside of the Drupal installation. For complete instructions, see Back up the portal.

    If you made modifications to files such as .htaccess, robots.txt, or defaults.settings.php (in the sites directory), you will have to reapply the changes after the update. You will also need to reapply any customizations made in the sites/all directory.

  3. Put your site into maintenance mode:
    drush vset --exact maintenance_mode 1
    drush cache-clear all
  4. Install the desired version of Drupal by using the following command:
    drush pm-update drupal-7.56

    Alternatively, you can run drush pm-update drupal to update to the latest Drupal core version. You can run drush pm-updatestatus to list available minor updates to Drupal core and contrib projects.

  5. Reapply any changes made to .htaccess, robots.txt, or defaults.settings.php (in the sites directory).
  6. Reapply any changes made to the sites/all directory.
  7. Take your site out of maintenance mode:
    drush vset --exact maintenance_mode 0
    drush cache-clear all

What if I encounter an issue during the update?

Restore your site to its previous state using the backup files that you created. Contact your Apigee support representative and provide any error messages that were reported during the update.