Information for: DEVELOPERS   PARTNERS

Drupal 9 on Cloud Platform

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.
  • By default, all new site provisions on Cloud Platform use MySQL 5.7 from August 5, 2020. If your existing site uses a MySQL version earlier than 5.7, you will receive an error message related to database versions when you update or install Drupal. For example, if you’re using  MySQL 5.6, 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 Cloud Platform

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

  • Use Acquia’s installer.

    The easiest way to create a Drupal 9 website on Cloud Platform 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 Cloud Platform (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 Cloud Platform environments.

        Note

        This is not required if you are using MySQL 5.7.

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

  • Download manually and deploy to Cloud Platform.

    To create a new Drupal 9 website on Cloud Platform, you may download a Cloud Platform 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 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:

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

Using Drupal 9 with multi-region failover

Acquia is providing extended support for MySQL 5.6 until the Acquia Cloud Next version of Acquia Cloud Platform officially offers the multi-region failover functionality in 2022. In the interim, Acquia Cloud Platform customers can utilize Drupal 9 with this functionality. However, certain features or modules in later versions of Drupal 9 might require the database functionality introduced in MySQL 5.7. In this situation, such Drupal features or modules won’t be available until the upgrade to multi-region failover completes on Acquia Cloud Next.