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.
  • All new site provisions on Cloud Platform will use MySQL 5.7 by default starting from August 5, 2020. If your existing site uses MySQL 5.6, and 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 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.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 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 an 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.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 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

In anticipation of the planned 9.1 release of Drupal in December 2020, Acquia is actively working on upgrading our Multi-Region Failover functionality to be fully compatible with MySQL 5.7. However, since this upgrade is not expected to be completed until early 2021, Cloud Platform customers with Multi-Region Failover should refrain from launching new Drupal 9 applications or upgrading existing application to Drupal 9. Multi-Region Failover applications running Drupal 9.0 at the time of the Drupal 9.1 release will not be able to update to Drupal 9.1 until Acquia’s updated Multi-Region Failover functionality with MySQL 5.7 compatibility is released.