Information for: DEVELOPERS   PARTNERS   SUPPORT

Installing a Drupal distribution

Important

  • The Remote Administration service is incompatible with the Drupal tarball installation process. However, Remote Administration is compatible with Drupal Composer-based sites.

  • Composer-based installs are recommended for real applications. For more information, see BLT.

  • Currently, the Cloud Platform user interface method is unavailable on the Cloud Next infrastructure and should only be used for demo and trial applications on the Cloud Classic infrastructure.

To install a Drupal distribution (or Drupal core), use one of the following:

A Drupal distribution is a custom edition of Drupal, tuned and extended with custom developed and contributed modules to enable desired features. Such a distribution includes Drupal core, Drupal contributed modules, themes, libraries, and installation profiles that together provide a Drupal solution. You can install most of the popular Drupal distributions in Cloud Platform. To import a Drupal distribution to Cloud Platform, you can leverage one-click selection.

Note

When first installing the Drupal.org-provided core Drupal 9 distribution, you are asked for a database password. Do not enter a password for the database, but instead click Save and Continue.

Installing a Drupal distribution through Composer

Prerequisites

Ensure that your development environment has the following:

Steps

  1. Execute the following Composer commands on your local machine, with the Drupal version adjusted from 9.0.0 based on the latest stable version available on Drupal.org:

    composer create-project --no-install drupal/recommended-project:^9.0.0 .
    sed -i'.original' 's/web\//docroot\//g' composer.json && rm composer.json.original
    composer require drush/drush:^10.2 drupal/mysql56 --no-update
    composer update
    

    The Composer commands will do the following:

    • Create a Drupal project.

    • Ensure the Drupal uses an Acquia compatible directory structure.

    • Require the MySQL 5.6 contributed module, which is temporarily necessary to run Drupal 9 on Cloud Platform environments.

      Note

      This is not required if you are using MySQL 5.7.

    • Require Drush 10.2 or later.

  2. Create a settings.php file and update it by following the instructions on the Acquia require line documentation page.

  3. Commit and push your new project to Cloud Platform using Git.

  4. Set your Cloud Platform environment to use PHP 7.4 or later.

  5. If your environment has an existing database used by one of your earlier or existing Drupal websites, Acquia recommends you:

    • Perform a database backup.

    • Download your Cloud Platform Drush aliases.

    • Use Drush to drop the database on your Cloud Platform environment (replace @my.alias with the appropriate alias for your application and environment) as displayed in the following example:

      ./vendor/bin/drush @my.alias sql-drop
      

      This ensures you have a clean database for your Drupal 9 install.

  6. Click the link in the Cloud Platform user interface to access the URL of the Cloud Platform environment and proceed to /core/install.php.

  7. Follow the prompts on your website to complete the installation process.

Important

To leverage Acquia CMS starter kits and add-ons in your Drupal distribution, use one of the methods described in Installing Acquia CMS.

Installing a Drupal distribution in a Cloud IDE

Cloud IDE also offers a convenient and opinionated way to install Drupal.

To install a Drupal distribution using a Cloud IDE:

  1. Launch your Cloud IDE. If you have not yet created a Cloud IDE, follow the instructions on Getting started with Cloud IDE.

  2. From the IDE Get Started page, click CREATE A NEW APPLICATION.

    Installing Drupal in IDE

    A terminal pane pops up and prompts you to install the Acquia Drupal recommended project or the Acquia Drupal minimal project.

  3. Select your target version by typing the number associated with your distribution selection in the terminal prompt and press Enter. Acquia CLI takes care of automatic installation of Drupal in Cloud IDE’s /home/ide/project directory.

    Install Drupal through ACLI

    After Drupal is installed, you can start developing or push from the IDE terminal to Cloud Platform with acli push:db and acli push:files. As a best practice, your codebase remains to be managed with Git.

Installing a Drupal distribution through the Cloud Platform user interface

Important

Currently, this method is unavailable on the Cloud Next infrastructure and must only be used for demo and trial applications on the Cloud Classic infrastructure.

  1. Sign in to the Cloud Platform user interface and select the application and environment where you want to install Drupal. You cannot install Drupal in a Production environment.

  2. On the environment’s Overview page, click Install Drupal.

    Cloud Platform install Drupal button

    Note

    If Install Drupal is disabled for use, ensure that the following required items are in place for your environment:

    • The Code entity in the environment has a branch or trunk selected—you cannot install to a tag.

    • Live Dev mode must be disabled for your application. Live Dev expects Drupal installation attempts only from the command line.

  3. On the Install distribution page, locate the Drupal distribution that you want to install, and click Install. For multiple distributions, you can click Learn more to get more information about a distribution.

  4. To install a distribution that is not listed, for example, your organization may have its own Drupal distributions, or you may want to install another distribution from drupal.org, click Install from URL. In the Install Drupal from URL dialog, enter the URL of the distribution.

    Note

    For Drupal 7, the URL of the distribution’s download file (must be in .tar.gz format). The URL of the distribution’s Drush .make file.

    Install another Drupal distribution

  5. In the Install Drupal from URL dialog, click Install.

Deploying a new Drupal distribution in an environment takes a few minutes. After the installation process completes, click the environment’s website URL to visit your Drupal website. This runs install.php to complete the Drupal installation. The Drupal install.php script opens in a new browser window. The script creates a standard Drupal database, sets up the administrator username and password, and configures other modules and features relevant to the Drupal distribution you chose.

Cloud Platform installing Drupal

To start modifying your code, make a local copy of the repository using the Git checkout command.

Downloading Drupal distribution manually and deploying to Cloud Platform

To install a Drupal distribution on Cloud Platform, you can download a Cloud Platform compatible .tar or .zip file of the latest Drupal release and complete the following steps:

  1. Decompress the downloaded archive into the docroot directory of your Acquia Git repository.

  2. Add a settings.php file and update it by following the instructions on Acquia require line.

  3. Commit and push your changes to Cloud Platform using Git.

  4. Set your Cloud Platform environment to use PHP 7.4 or later.

  5. If your environment has an existing database that was used by one of your Drupal websites before, Acquia recommends you to:

    • Perform a database backup

    • Download your Cloud Platform drush aliases

    • Use Drush to drop the database on your Cloud Platform environment (replace @my.alias with the appropriate alias for your application and environment) as displayed in the following example:

      ./vendor/bin/drush @my.alias sql-drop
      

      This ensures you have a clean database for your Drupal install.

  6. Click the link in the Cloud Platform user interface to access the URL for the Cloud Platform environment and proceed to /core/install.php.

  7. Follow the prompts on your website to complete the installation process.

Updating an existing website to Drupal 9 on Cloud Platform

The process to update your application from Drupal 8 to Drupal 9 resembles the Drupal 8 minor version upgrade process. You can prepare your Drupal 8 website for Drupal 9 by:

  • Removing all deprecated code from your custom modules and themes

  • Upgrading to the latest stable version of core

  • Upgrading all contributed modules to the latest stable versions compatible with Drupal 9

Once these steps are complete, you can proceed by following the standard Drupal Core update process used during minor version updates.

For more information on how to prepare your Drupal 8 website for Drupal 9, see:

For more information about using Composer to update Drupal Core, see Update Drupal code via Composer.