Moving from Drupal 11 to 12 is not a migration. It is an update with Composer, like going from 10 to 11 was. The work is in the preparation: getting on a recent Drupal 11, dealing with the modules that left core, and making sure your contributed modules and custom code are ready. This guide follows the official upgrade documentation on drupal.org, which is still marked as a work in progress, and the 12.0 release notes.
1. Get on a recent Drupal 11 first
Drupal 12 has removed all database updates that were added before Drupal 11.3.0. A site on 11.2 or earlier must therefore update to 11.3.0 or later before it can move to 12. The beta release notes recommend going further, to 11.4 – or 11.5 once it is out, in the same week as 12.0.0. Run the database updates (drush updatedb) and make sure the site works on that version before you continue.
2. Make a backup and a test copy
Take a copy of the database and the files, and do the upgrade on a copy of the site first – never directly in production. Write down any changes you have made to scaffold files such as .htaccess and robots.txt, since Composer writes new versions of them.
3. Deal with modules that left core
Drupal 12 removes Ban, Contact, Field Layout, History, Search, Settings Tray, Shortcut, Telephone and Toolbar from core (they continue as contributed modules), and Migrate Drupal with its UI. If the site uses one of them:
- Still need it? Require the contributed version with Composer while you are still on Drupal 11. Do not uninstall the module to get past the upgrade – that deletes its configuration and data.
- Not needed? Uninstall it on Drupal 11, deliberately, before you upgrade.
The same applies to the text with summary field type: if your content types use it, update to 11.5, run the updates, and add the contributed module before moving to 12.
4. Check contributed modules and custom code
- Upgrade Status (version 5.0.0 supports Drupal 12) lists every module and theme on the site and tells you which are ready, which have a newer release and which still use deprecated code.
- Drupal Rector rewrites many deprecated calls in your custom code automatically. Review the changes it makes; it does not cover everything.
- Look at each project's page on drupal.org and at its
composer.json. Many projects only support Drupal 12 in a development branch so far – see Which contributed modules work with Drupal 12?
If a module you depend on has no Drupal 12 version at all, wait with the upgrade. Drupal 11 is supported until December 2028, so there is no reason to rush.
5. Update with Composer
The official guide uses these steps, run in the project root:
composer require 'drupal/core-recommended:^12' 'drupal/core-composer-scaffold:^12' 'drupal/core-project-message:^12' --no-update
composer require drush/drush --no-update
composer update --dry-run
composer update
The dry run shows what will change without changing anything – read it, and fix any conflicts it reports, before the real update. Two things worth knowing:
- Drush: Drush 13 only allows Symfony 6 and 7 and cannot be installed with Drupal 12. At the time of writing, only the development branches of Drush (14.x and 15.x) allow Symfony 8.
- Development versions: if a module only supports Drupal 12 in a dev branch, require that branch explicitly (for example
drupal/metatag:2.2.x-dev) and letcomposer.lockpin the exact commit. Replace it with a stable release as soon as one exists.
6. Run the database updates
drush updatedb
drush cache:rebuild
Then go through the site: the front page, forms, editing, the pages of each content type, and the logs (drush watchdog:show). Merge back any changes you had made to the scaffold files.
7. Deploy
When the copy works, deploy the same composer.lock and configuration to production, run drush deploy (database updates and configuration import), and check the site again. Keep the backup from step 2 until you are sure everything works.