This guide will reference the DM teams standard local Drupal setup that uses Lando, Drush and Composer.
Quick Links
Preparation
Before we upgrade our Drupal 9 website we do the following step:
Create a copy of the site locally as a backup
cd workspace/ cp -r gamework gamework-backupCreate a backup of the database
cd workspace/gamework lando start lando db-exportCheck Drupal 10 compatibility using the upgrade_status module
composer require 'drupal/upgrade_status:^4.3' lando drush en upgrade_status lando drush crUninstall old/unsupported modules
lando drush pmu multiple_sitemap lando drush pmu quickedit lando drush pmu rdf composer remove drupal/multiple_sitemap --no-update composer remove drupal/quickedit --no-update composer remove drupal/rdf --no-updateUpdate modules to the latest / supporting Drupal 10
During this step you may run into loops where a module requires another modules version. If using -W doesn't work you can set the version manually in composer.json
Set the file permissions
chmod 777 gamework/web/sites/default chmod 666 gamework/web/sites/default/*settings.php chmod 666 gamework/web/sites/default/*services.ymlInstall Drupal core
composer require 'drupal/core-recommended:^10' 'drupal/core-composer-scaffold:^10' 'drupal/core-project-message:^10' --no-updateRemove files and folders
rm composer.lock rm -rf vendor rm -rf web/core rm -rf web/modules/contribRun composer install
export COMPOSER_PROCESS_TIMEOUT=1200 export COMPOSER_DISCARD_CHANGES=true composer install --no-interactionUpdate the DB
lando rush updb --yesClear Cache
lando drush crSet Permissions
chmod 755 gamework/web/sites/default chmod 644 gamework/web/sites/default/*settings.php chmod 644 gamework/web/sites/default/*services.yml
