Vendor support for Drupal 8 ends in November, 2021. Site owners are responsible for upgrading their sites from Drupal 8 to Drupal 9 no later than January 31, 2022. If your site has been migrated to the Pantheon platform, please use the below instructions to complete the upgrade.
Tools
You will need git, composer, php. Use the links below to install or use UMD Virtual Workspace which has the necessary tools installed.
Create a SSH key certificate to checkout your site code from Pantheon
From a terminal window, run the command: ssh-keygen
This command works on Linux, MacOS, and Windows 10.
Unless you have reason to change it, leave the default location of ~/.ssh/id_rsa as is. If the command says the key already exists, you can either overwrite it, or continue to the next step with your existing key.
A passphrase is recommended to provide greater security, but can conflict with tools that cannot handle them.
Once the files are created, copy the contents of ~/.ssh/id_rsa.pub to your clipboard.
Linux and Mac users can cat the file to the terminal and copy the output:
cat ~/.ssh/id_rsa.pub
Windows users can achieve the same result with type:
type .ssh\id_rsa.pub
ssh-add ~/.ssh/id_rsa
Cut and paste the certificate into Pantheon, this is done under your account page
Upgrade Process
(Optional, but recommended) Create a Multidev environment to test the update
Multidev are development environments for teams that allows a developer to fork the entire stack (code and content), work independently, then merge the code changes back into the master. Each forked branch will have its own separate development environment, including database and files.Check out the site project repository to your local machine
Check out the site project repository to your local machine
Click on the 'Connection Info' on the top right.
Copy the line under "
If when attempting to check out the repo you receive the message "Connections Fail With: no matching host key type found. Their offer: ssh-rsa", please see the Pantheon SSH Key doc in the resources section below for troubleshooting steps.
Git by default checks out the main 'origin/master' branch, which is attached to the dev version of your site, if you are using the multidev development method, run the following commands to check out your multidev branch: 'git pull' then 'git checkout --track origin/my-multidev-branch-name' without the ' marks.
add the changes, commit them and then push them from your local repo to the site repo
The upgrade status module will now be added to your Pantheon site
Enable the module from the Extend menu on your Drupal site
Run the upgrade status report by visiting /admin/reports/upgrade-status and running the report.
Update, remove or fix issues identified by the upgrade status, most likely this will involve updating modules to newer versions that are compatible with Drupal 9
Modules can be updated from your local repo with Composer with the command "composer require drupal/module_name" or "composer require drupal/module_name:^x" if you need a certain version.
Once the module version has been updated via composer on your local repo; add, commit and push them with git.
It may be necessary to clear the caches after making fixes for them to show on the upgrade status page, this can be done from your Pantheon dashboard in the top right.
!IMPORTANT! - if you have the UMD Terp theme on your site, it will be necessary to run the database update script after updating UMD Terp and UMD Terp Base to their current versions.
updating the UMD Terp and UMD Terp Base can be done with the following in your local repo: composer require umd_digital/umd_terp composer require umd_digital/umd_terp_base
Once you have updated to the most recent UMD Terp versions in your local repo, add the changes, commit the changes and push then as normal
With the current versions confirmed on your site, visit yoursite-umd.pantheonsite.io/update.php
Running these updates is needed to prevent issues for your site during and after the Drupal upgrade.
Update database driver version
within the pantheon.yml file in the root of the repo, add the following lines
database: version: 10.4
Update Drupal Core
From the multidev branch on your local repo, run the following:
If you encounter issues with core-recommended errors, try the following troubleshooting lines instead:
Look for drupal/core-recommended or drupal/core in composer.json and remove the line(s): "drupal/core-recommended": "^8.9.0" Then run composer update again: composer update
in composer.json Change to "drupal/core-recommended": "^9", in composer.json Change "drush/drush": "^10" Run composer update
Run composer require -W --ignore-platform-reqs pantheon-systems/drupal-integrations:^9