Drupal 9 is similarly available on Pantheon to all new sites, and as an upgrade path for Drupal 8+ sites.
Since Drupal itself is in active development and each new version brings a number of significant changes from previous versions, this doc outlines the biggest changes and answers frequently asked questions.
Drupal includes many of the features and layout that Drupal users are familiar with, and it removes deprecated code to help improve future Drupal development.
The latest version of Drupal updates Drupal’s underlying dependencies like Symfony and Twig, removes several deprecated API functions in favor of better options, and allows everyone running Drupal 8.8+ an easy upgrade path to Drupal and beyond.
On the Pantheon Platform, Drupal sites use Integrated Composer, letting you deploy your site on Pantheon with one-click updates for both upstream commits and Composer dependencies, while still receiving upstream updates.
The upstream has the following directory structure:
└─ upstream-configuration/ or upstream-config/ for WordPress
└─ sites/ for Drupal
└─ wp-content/ for WordPress
.gitignore: Prevents build artifacts generated by Composer from being committed to the upstream or site code repositories. Note that changing the tracking status of Composer-managed files and directories can result in build failures or lead to unexpected errors.
composer.json: The two different
composer.jsonfiles allows you to customize individual sites without inherent merge conflicts and enables one-click updates.
- Root-level: Site-level customizations.
composer.json: Composer automatically updates
composer.jsonwith customizations for the upstream. Avoid manually modifying this file.
build_step: truedirective in
pantheon.upstream.ymlenables the build step.
When a site is created, Pantheon runs
composer install, generates a
composer.lock file, and commits it back to the site’s code repository. To avoid potential merge conflicts after applying an upstream update, do not commit the
composer.lock file from your upstream root to the upstream repository.
composer.lock file should not be listed in your
.gitignore file because it must be committed for individual sites created from your custom upstream. Use the command below to avoid accidentally committing a
composer.lock file when working directly with your custom upstream.
echo /composer.lock >> .git/info/exclude
The command has the same effect as ignoring the file in the top-level
.gitignore file, except that the
exclude file is not saved in the repository when you push changes back to the remote origin. You must re-run this command every time you make a new local clone of your upstream if you would like to protect against inadvertently committing a
Build artifacts are stored in a Git tag like
$BRANCHNAME is the name of the environment or Multidev feature branch.
It is a requirement that all build artifacts should be ignored in the
.gitignore file. Ensure you add entries to the
.gitignore any time you modify the build to move installation files to a new locations.
Learn more about working with upstream and site dependencies in the Integrated Composer documentation.
Set up SSH Keys on your local computer and Pantheon account.
Mac users can use Homebrew to install both Git, Composer, and Terminus along with their required dependencies:
brew install git composer pantheon-systems/external/terminus
Create a new Drupal site from the Dashboard as you would with any new site. Integrated Composer is built in and ready to use.
To upgrade or migrate an existing Drupal site to Drupal with Integrated Composer, see the Drupal Migration Guide.
To check an existing site's compatibility to upgrade, visit the appropriate Drupal Migration Guide.
See the appropriate Drupal Migration Guide for help troubleshooting common issues with Drupal with Integrated Composer.
Contact support to report any issues that you encounter.
Manually update the landofile in the project folder, and set
drupal9 as the framework:
# Lando issue 2831 workaround for D9
When you create a project with Lando from the Pantheon recipe, the
framework will default to
drupal8 for a Drupal site.
If you created new project with Lando, change the value for
drupal8, then run
Do not remove
composer.json. If it's removed,
terminus drush commands will fail with errors related to Twig.