Information for: DEVELOPERS   PARTNERS

Drupal 9 on Acquia Cloud

About Drupal 9

Drupal 9 is similar to Drupal 8, with two exceptions: deprecated code in 8.x has been removed in 9.x and package dependency versions have changed.

By design, new features won’t be added to Drupal 9.0, and new features added in Drupal 9.1 or greater won’t be ported back to Drupal 8.x.

Drupal contributed modules that are compatible with Drupal 9 will have a ^9 indicator in the project’s Downloads section as displayed in the following example:

Downloads section on Drupal.org

You can view the status of Drupal 9 contributed module updates in the Drupal 9 Deprecation Status page on Drupal.org.

Note

  • Drupal 8 will reach end-of-life (EOL) and will no longer receive long-term support from the Drupal community after the published EOL date. Unlike earlier major Drupal versions, Drupal 8 won’t have any vendor extended security support.
  • Contributed modules on Drupal.org may not yet be compatible with Drupal 9. Attempting to install the modules using Composer won’t work until Drupal 9 compatible releases for the modules become available.
  • MySQL 5.7 won’t be available for most Acquia Cloud subscribers until a later date. If you receive an error message related to database versions while updating or installing Drupal, you must install and configure the MySQL 5.6 driver developed and maintained by Acquia to resolve the error.

Creating a new Drupal 9 website on Acquia Cloud

Three methods are available for creating a new Drupal 9 website on Acquia Cloud.

  • Use Acquia’s installer.

    The easiest way to create a Drupal 9 website on Acquia Cloud is to use Acquia’s installer in a new environment following the instructions on the Installing a Drupal distribution documentation page.

  • Use Composer to deploy to Acquia Cloud (Recommended).

    You may use Composer to create a new Drupal 9 application. To do so, complete 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 Acquia Cloud environments.
      • Require Drush 10.2 or greater.
    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 Acquia Cloud using git.

    4. Set your Acquia Cloud environment to use PHP 7.3 or PHP 7.4.

    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 Acquia Cloud drush aliases.

      • Use Drush to drop the database on your Acquia Cloud 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 Acquia Cloud user interface to access the URL of the Acquia Cloud environment and proceed to /core/install.php.

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

  • Download manually and deploy to Acquia Cloud.

    To create a new Drupal 9 website on Acquia Cloud, you may download an Acquia Cloud compatible .tar or .zip file of the latest Drupal 9 beta release and then 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 the Acquia require line documentation page.

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

    4. Set your Acquia Cloud environment to use PHP 7.3 or PHP 7.4.

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

      • Perform a database backup

      • Download your Acquia Cloud drush aliases

      • Use Drush to drop the database on your Acquia Cloud 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 Acquia Cloud user interface to access the URL for the Acquia Cloud 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 Acquia Cloud

The process to update your application from Drupal 8 to Drupal 9 will resemble 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 the Update Drupal code via Composer page on Drupal.org.