Was this Helpful?

For an on-premises, or OPDK, installation of the Developer Services 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 upgrade an OPDK installation of Drupal.

This upgrade is for your OPDK installation of Drupal only. For customers using a cloud deployment of the portal, Apigee will automatically apply all Drupal security updates.

This procedure only upgrades your installation of Drupal. It does not upgrade the Apigee software that ships as part of the portal. For information on upgrading the Apigee portal software, see the Developer Channel Services Installation and Configuration Guide.

Determining your current Drupal version

Before you start the Drupal upgrade, you can determine your current Drupal version by running the following command from the Drupal installation folder. By default, Drupal is installed in /var/www/html:

> cd /vars/www/html
> drush status | grep 'Drupal version'

You should see output in the form:

Drupal version                  :  7.31  

If you installed Drupal in a directory other than /var/www/html, make sure to change to that directory before running the drush command.

Upgrading Drupal

To upgrade your OPDK Drupal installation:

  1. Create a new directory called update outside of the Drupal installation file structure. Typically, you create this directory under your home directory:

    > mkdir update
  2. Change to the update directory.
  3. Download the latest Drupal code by using the following command:

    > drush dl drupal

    The command create a directory named drupal-x.y under update, where x.y corresponds to the current version of Drupal.

    Note: If your portal is on a server with no external internet connection, perform this step on a server with internet access, and then copy the drupal-x.y directory to your portal server.
  4. Remove the sites directory under the drupal-x.y directory:

    > rm - R -f drupal-x.y/sites
  5. Copy the Drupal update to your Drupal installation directory. The default directory is /var/www/html:

    > yes | cp -R drupal-x.y/* /var/www/html

    Depending on file permissions, you might have to use sudo to run this command, or run it as an administrator. Modify the destination directory if you installed Drupal in a directory other than /var/www/html.
  6. Change directories to your Drupal installation directory:

    > cd /var/www/html
  7. Run the following drush command to update the Drupal database:

    > drush updb -y
  8. Run the following command to rebuild the Drupal registry:

    > drush rr

    If the rr command cannot be found, install it:

    > drush dl registry_rebuild
    > drush cc drush

    If you do not have an internet connection, move to another machine and download it from https://www.drupal.org/project/registry_rebuild
  9. Clear all caches:

    > drush cc all

The upgrade is now complete.


Help or comments?

  • Something's not working: See Apigee Support
  • Something's wrong with the docs: Click Send Feedback in the lower right.
    (Incorrect? Unclear? Broken link? Typo?)