A machine-readable guide to this site for AI agents and language models is available at/llms.txt(https://dev.acquia.com/llms.txt on the production site).
The following are the essential steps to upgrade to Drupal 11:
If your site does not have custom modules or custom code, skip Steps 2 through 4 and continue to Step 5.
You cannot directly move from Drupal 9 or early Drupal 10 to Drupal 11. You must update core to Drupal 10.3.0 or the latest 10.x release before attempting the Drupal 11 upgrade. Older releases lack the necessary database upgrade paths and miss the latest deprecation notices needed for an accurate scan.
Unlike the Drupal 9 to 10 upgrade where Upgrade Status had to be removed, Upgrade Status 4.x and 5.x are fully compatible with Drupal 10 specifically to help you prepare for Drupal 11. Ensure that you are using the latest version of the module to scan your site, but remember to remove it before pushing to production.
The main difference between Drupal 10 and Drupal 11 is the removal of deprecated code. If you have PHP code that relies on a deleted function, your site will display a white screen and generate fatal errors. To verify compatibility with Drupal 11, you must run a compatibility tool such as the Upgrade Status module.
Do not commit configuration or composer changes that enable Upgrade Status or retain it in the codebase.
After you obtain an Upgrade Status report, you must refactor your code. You must remediate all custom code before testing or executing the upgrade. Many deprecation changes are as minor as replacing one function or method with another. However, thorough testing is essential since a single-word replacement can still break a website. Most Drupal API changes have automated coverage in drupal-rector. Upgrade Status indicates when to use drupal-rector to accelerate the process.
Drupal 11 strictly requires PHP 8.3. Start with the local environment or Cloud IDE and then update all CI/CD environments, your teams' local environments, and all cloud environments to PHP 8.3. To identify incompatible dependencies, you can add PHP as a dependency in Composer with the following command:
"require": {"php": ">=8.3" }In Composer, run the following command:
composer update php --with-all-dependenciesUpdate all contributed modules to be compatible with Drupal 11 and PHP 8.3. Use Composer to perform the updates. To obtain a quick overview of available updates for the direct dependencies of your site, run:
composer outdated --directFocus only on updating direct dependencies rather than transitive sub-dependencies. Upgrade Status also indicates which modules have compatible versions. If you require a contributed project that is currently not project-ready, require an incompatible project with mglaman/composer-drupal-lenient and apply necessary patches with cweagans/composer-patches.
Do not update everything at once. Update contributed modules in small and manageable batches, test each batch before moving to the next, and update Drupal core last. This method prevents complex dependency conflicts and makes it easier to troubleshoot issues.
Ensure that all other Composer-required tools such as Acquia CLI are compatible with Drupal 11 and PHP 8.3. Incompatible tools can block your update.
If you are already using Drush in your project through Composer, update to Drush 13 with the following command:
composer require drush/drush:^13Drush 13 requires PHP 8.3 and Symfony 7 components, aligning with the requirements of Drupal 11.
Major upgrades typically fail during the initial attempt. Therefore, you must create a thorough test plan in a safe environment to mitigate failures. Execute several dry runs in local, CI/CD, and development environments before you push a major version update to production.
If the composer update drupal/core --with-all-dependencies command fails to resolve to Drupal 11, run composer why-not drupal/core ^11. This command identifies dependencies in the Composer tree that require a version other than 11.x.
Ensure that you create a snapshot of the code and database before you deploy to the production environment. Backups enable immediate recovery if a problem occurs during the live database updates.