Repository navigation
Upgrade Drupal 8.x
Ensure you have the latest stable version of the site and are in the primary code branch. Get the db and (optionally) files from the live site.
Review the repo README/wiki to see if there are any notes regarding special cases or other misc issues.
Follow the steps below to update your core files.
- Create a upgrade branch using the target core version:
upgrade-8.3.4. - Run
composer update drupal/core --with-dependenciesto update Drupal Core and its dependencies. - Run
robo installto ensure the site installs correctly. - Update
composer.jsonto reflect the updated versions (not needed for minor version changes like in most security updates). - Run
drush updb,drush entity-updates, anddrush cr. - Review any patch that threw
Could not apply patch! Skipping.messages. IF it has been integrated into the project, you can remove it (Q: How can you tell?). This message is frequently misleading, so be sure to check! (the patch may have been previously applied if you have an existing version of the site or re-runcomposer updatefor example). - Run
git diffto determine if any of the scaffolding files(?) have changed. Review the files for any changes and restore any customizations to.htaccessorrobots.txt. - Commit everything all together in a single commit, so
webwill remain in sync with thecorewhen checking out branches or runninggit bisect.
Your requirements could not be resolved to an installable set of packages.
A locked/specific version of a module being incompatible with core or an updated module. Usually resolvable by upgrading to a more recent version. In the case of devel modules, they may often be removed.
[InvalidArgumentException] Package is not installed:
This is an intermittent composer bug that fixes itself simply by re-running composer update.
PHP Fatal error: (something was not found)
Happens when a library/dep/module is no longer available. For example, if you remove a module from composer.json without uninstalling it first from a working site, the config files will still be in place and config/core.extension.yml will still look for it. (It will also be lingering in the db causing errors after you import the live db).
PHP Fatal error: Function previously declared
A patch needs to be re-rolled.
Display Suite horribly broken
Display Suite does not like file-based configuration. To upgrade DS, have the site built pre-upgrade and:
- Disable file-based config in
web/sites/default/settings.php. Search for$settings['bootstrap_config_storage']. - Import the live DB.
- Update the code as above.
- Export the site configuration using either the admin interface
/admin/config/development/configuration/full/exportordrush cex.
Need D8 Deploy process here.