- Add audit.sh to your repo root
- Run
sh audit.shto exectute the script - The script will output a list of:
- services from the
.platform/services.yamlfile - php version from the
.platform.app.yamlfile - a list of custom modules contained in
web/modules/custom - composer dependencies not included in the boilerplate
- patches in the composer file
- services from the
- The results will also be written to a
project_summary.mdfile in the project root.
- Add ddev to the project
ddev config(defaults are fine) - Run
composer installto pull in current dependencies - Add the scripts in the
ddev-web-commandsdirectory to.ddev/commands/web/ - Start the site with
ddev start - Import the db with
ddev import-db < [databasename] - Flush caches
ddev drush cr - Run script with
ddev d11prepare
- Run
composer installto pull in current dependencies - Add the script
d11prepare.shto the root project directory - Start site with
lando start - Import the db with
lando db-import [databasename] - Flush caches
lando drush cr - Run script in root
sh d11prepare.sh
The script will first ask whether the site is based on a VPR, Science or other boilerplate. It then attempts to make the following updates
- Drush
- Webform (+adds patch - not needed once https://www.drupal.org/project/webform/issues/3526888 is in a release)
- File Delete
- Formtips (needs to straddle versions: ^1.11||^2.0)
- Gin (needs to straddle versions: ^4.1||^5.0)
- Gin Toolbar (needs to straddle versions: ^2.1||^3.0)
- Image Widget Crop
- Linkit
- Linkit Media Library
- UBC Portfolio modules (does not include CWL or custom modules)
- UBC Recipes
- Add and install the Upgrade Status module (if needed)
- Update the core version requirement to VPR and Science portfolio child themes
- Prompt you to add the core version requirement if you're using a custom theme
- alter the recipe location to the root directory
- alter the .gitignore to remove /web/recipes/ and add /recipes/
You should see a large number of recipes files in /web/recipes/ - these should not be committed and can be safely discarded.
- Review and resolve the issues on the Upgrade Status page
- /admin/reports/upgrade-status
- Note that formtips will show as having an Incompatible local version, but that can be disregarded since we are straddling required versions. The updated version will be pulled in when core is updated.
- Backup work
- Run database updates to ensure the latest changes are in place.
ddev drush updbORlando drush updb - Export database in case you want to roll back.
ddev export-db --file=db.sql.gzORlando db-export
- Run Update: also see Official Docs
- Update permissions.
chmod 777 web/sites/default
chmod 666 web/sites/default/*settings.php
chmod 666 web/sites/default/*services.yml
- Change core without updating.
composer require 'drupal/core-recommended:^11' \
'drupal/core-composer-scaffold:^11' \
'drupal/core-project-message:^11' --no-update
- Perform the update dry-run
composer update --dry-run - If no errors, perform the update
composer update - Run database updates again.
lando drush updb - Reinstate permissions (optional on local)
chmod 777 web/sites/default
chmod 666 web/sites/default/*settings.php
chmod 666 web/sites/default/*services.yml
- Commit all changes