Upgrading Drupal core on Acquia Cloud

From time to time, you will need to upgrade Drupal core in your Acquia Cloud applications. This may occur when there are new Drupal core features that you want or security updates that you need.

This page describes two ways to upgrade Drupal core:

Upgrading Drupal 7 with Acquia Dev Desktop

The easiest way to upgrade Drupal 7 core for an Acquia Cloud application is to use Acquia Dev Desktop, which provides a full Drupal-specific stack that includes Apache, MySQL, and PHP. You can use Acquia Dev Desktop to develop Drupal applications locally on your computer, and then sync it with the same application on Acquia Cloud. Since it is closely integrated with Acquia Cloud, using Acquia Dev Desktop can be the easiest way to import your application into Acquia Cloud. This section assumes that you have already installed Acquia Dev Desktop and synced it with your applications on Acquia Cloud.

First, upgrade Drupal core on the local environment with Acquia Dev Desktop:

  1. In Acquia Dev Desktop, select the application you want to upgrade.
  2. Next to Local code, click the Open Drush console button.
  3. In the Drush console, run this command:

    drush up

    Drush upgrades Drupal core to the latest release.

  4. Next to Local site, click the URL link. Your upgraded Drupal application opens in a browser window. You can test this local copy of your upgraded Drupal application before you sync it with your Acquia Cloud Development environment.

Next, sync the local copy of your upgraded Drupal application with your Acquia Cloud Development environment:

  1. In Acquia Dev Desktop, select Push to Cloud Dev, and select the Code checkbox.
  2. Click Push code to Cloud Dev.
  3. Acquia Dev Desktop pushes your upgraded Drupal application to the Acquia Cloud Development environment and commits the code to the Acquia Cloud code repository.

Upgrading with Git

To upgrade Drupal 8, if you use a Git repository:

  1. Download the latest version of Drupal 8.
  2. Ensure that any upstream changes to the docroot directory are pulled into your local working directory and that you have no locally modified, added, or deleted files.

    git pull

    If you have any locally modified, added, or deleted files, resolve any conflicts before you move on in the procedure.

  3. Remove the core and vendor directories. Also remove all of the files in the top-level directory, except any that you added manually.

    rm -rf core vendor
    rm -f *.* .*
  4. Extract the Drupal tar file into the docroot directory inside your local checkout or clone of your Acquia Cloud repository.

    cd /path/to/checkout/trunk/docroot
    tar --strip-components=1 -xzf /path/to/drupal-8.2.3.tar.gz
  5. Add the new files to your code repository.

    git status --untracked-files=all
    # On branch master
    # Untracked files:
    #   (use "git add <file>..." to include in what will be committed)
    #
    # some/new/file.inc
    nothing added to commit but untracked files present (use "git add" to track)
    git add some/new/file.inc
  6. Remove any files that you don't need.

    git rm [filename]
  7. Commit your changes.

    git commit -a -m "Upgrade to Drupal 8.2.3."

    Note that at this point, Acquia Cloud does not deploy your changes. The commit command affects only your local working repository.

  8. Push your local version of the branch to the remote repository at Acquia.

    git push
  9. Run update.php by visiting http://[dev-env-URL]/update.php (replace [dev-env-URL] with the URL of your Development environment). This will update the core database tables.
  10. Test the upgraded application on your Development environment. Once you are satisfied, deploy your code in the Staging environment, and then to Production.
  11. Run update.php in your production environment to update the core database tables there.

Contact supportStill need assistance? Contact Acquia Support