Upgrading Drupal core on Acquia Cloud

When there are new Drupal core features that you want or security updates that you need, you should upgrade your Drupal core.

To upgrade your Drupal core, follow the procedure for your repository.

Upgrading with Git

To upgrade if you use a Git repository:

  1. Download the latest version of Drupal.

  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. 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-6.22.tar.gz

  4. 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

  5. Remove any files that you don't need.

    $ git rm [filename]

  6. Commit your changes.

    $ git commit -a -m "Upgrade to Drupal 6.22."

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

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

    $ git push
  8. Deploy your code in the staging environment, and then push it to production.

Upgrading with SVN

To upgrade if you use an SVN repository:

  1. Download the latest version of Drupal.

  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.

    $ svn update
    $ svn status

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

  3. 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-6.22.tar.gz

  4. Add the new files to your code repository.

    $ svn status | fgrep '?'
    ? some/new/file.inc
    $ svn add some/new/file.inc
    A some/new/file.inc

  5. Remove any files that you don't need.

    $ svn delete [filename]

  6. Commit your changes.

    $ svn commit -m "Upgrade to Drupal 6.22."

    Acquia Cloud deploys the latest code from /trunk into your development environment.

  7. Deploy your code in the staging environment, and then push it to production.

Related topics