Skip to content

Drupal 10 to 11 upgrade: the steps with Composer and drush

· The AYT team · 6 min read

Wooden library shelves with neatly arranged books

The Drupal 10 to 11 upgrade is done with Composer: you require drupal/core-recommended and drupal/core-composer-scaffold at ^11, run composer update, then drush updatedb. Before that, the site must be on Drupal 10.3 or newer, on PHP 8.3, and your contributed modules need Drupal 11 releases. The preparation takes longer than the upgrade itself.

The date matters: Drupal 10 support ends on December 9, 2026 (details in Drupal 10 end of life).

What you need first

  • A copy of the site to try it on first, for example locally in DDEV, as the drupal.org guide also recommends.
  • Command-line access with Composer 2.7 or newer and drush.
  • A backup of files and database: drush sql:dump for the database or drush archive:dump for everything.
  • A server that meets the Drupal 11 requirements: PHP 8.3+, MySQL 8.0 or MariaDB 10.6+.

Step 1: bring Drupal 10 up to date

Update core to the latest 10.x release (the last minor is 10.6):

composer update "drupal/core-*" --with-all-dependencies
drush updatedb
drush cache:rebuild

The upgrade to 11 refuses sites older than 10.3, because the earlier database updates were removed from Drupal 11.

Step 2: run Upgrade Status

Install the Upgrade Status module and open its report under Reports → Upgrade status:

composer require drupal/upgrade_status --dev
drush pm:install upgrade_status -y

The report shows three things: which contributed modules already have Drupal 11 compatible releases, which modules need updating, and which custom code (modules, themes) uses removed APIs. Work through the list until it's empty. Drupal Rector fixes many of the problems in your own code automatically.

Step 3: remove the modules dropped from core

Drupal 11 no longer includes Actions UI, Activity Tracker, Book, Forum, Statistics and Tour. If you use one, install its contributed version (for example composer require drupal/book) before the upgrade. If you don't use it, uninstall it:

drush pm:uninstall tour -y

Step 4: change the core version

Make the settings folder writable:

chmod u+w web/sites/default
chmod u+w web/sites/default/*settings.php
chmod u+w web/sites/default/*services.yml

Require the core packages at version 11, without installing them yet:

composer require 'drupal/core-recommended:^11' \
  'drupal/core-composer-scaffold:^11' \
  'drupal/core-project-message:^11' --no-update
composer config allow-plugins.symfony/runtime true
composer require drush/drush --no-update

The second command is needed from Drupal 11.4. If composer.json also lists drupal/core on its own, remove it with composer remove drupal/core --no-update.

Step 5: run the update

Check what would change first, then apply it:

composer update --dry-run
composer update

If Composer can't find a working combination, a contributed module usually still requires ^10. The error message names it. Update or remove that module, then try again. To update only core and drush, use composer update "drupal/core-*" drush/drush --with-all-dependencies.

Step 6: update the database

composer install
drush updatedb:status
drush updatedb
drush cache:rebuild

Then restore the permissions on the settings folder:

chmod 755 web/sites/default
chmod 644 web/sites/default/*settings.php
chmod 644 web/sites/default/*services.yml

Check under Reports → Status report that the version shown is 11.x and that there are no errors. Test forms, login, search and the pages that involve the most modules.

Step 7: take it live

Don't run composer update on the production server. Upload composer.json and composer.lock from the tested copy, run composer install --no-dev, then drush updatedb and drush cache:rebuild. That way production gets exactly the combination of versions you tested.

Common problems

Composer says PHP is too old

Sometimes composer.json pins a PHP version in config.platform.php (8.1, for example) so dependencies resolve for an old server. Drupal 11 needs 8.3, so Composer refuses. Change the value with composer config platform.php 8.3 or delete the key, once the server already runs PHP 8.3.

A module has no Drupal 11 release yet

Look in the module's issue queue for a "Drupal 11 compatibility" patch. If the patch exists but isn't in a release yet, drupal.org's Lenient Composer endpoint (described in the drupal.org upgrade guide) lets you install the module even though it isn't marked compatible, and you apply the patch with cweagans/composer-patches. Use this only as a stopgap and keep a note of which modules went in this way.

Composer runs out of memory

A composer update on a large Drupal project can use far more memory than PHP's usual limit. On the local copy you lift Composer's limit with COMPOSER_MEMORY_LIMIT=-1 composer update.

The site throws an error after updatedb

Read the latest messages with drush watchdog:show --count=20. Most errors come from a custom module that uses a removed API and that Upgrade Status couldn't fully analyse (dynamically generated code, for example). Fix the code and run drush cache:rebuild again.

Drupal 10 to 11 upgrade without SSH

Without a command line on the server, you do the whole upgrade on the local copy: steps 1–6 run on your machine, with the site's database imported locally. At the end you upload the whole project (including vendor/ and web/) via FTPS or the File Manager, import the upgraded database through phpMyAdmin and clear the cache. Put the site in maintenance mode while you swap, so content added in the meantime isn't lost.

On AYT hosting

AYT has no SSH, but the Drupal Toolkit in the panel runs Composer and drush for you. The Commands page runs any non-interactive drush command, for up to 120 seconds: status, updatedb:status, updatedb -y, cache:rebuild.

The Drupal Toolkit's Commands page with a drush command

The toolkit manages Drupal 11: its update button runs composer update drupal/core-*, drush updatedb and drush cache:rebuild, after saving the database. Updates stay within Drupal 11, so the jump from 10 to 11 isn't done from the panel. You do it locally, as above, upload the files via FTPS and the database through phpMyAdmin, then run updatedb -y and cache:rebuild from Commands. If you upload the project to a new domain, the panel finds Drupal in its folder when you open the domain's page (or with Scan my folders in the Drupal Toolkit), and the "Use the Drupal nginx profile" button moves the root to web. From then on, Drupal 11 updates come from the toolkit. See the supported apps and the plans.

More articles

All articles