Skip to content

Drupal 7 to 11 migration: a plan for legacy sites

· The AYT team · 8 min read

Wooden library shelves with neatly arranged books

A Drupal 7 to 11 migration is not an upgrade: you build a new Drupal 11 site and move the content, users, taxonomies and files out of the Drupal 7 database with the migration modules in core (Migrate, Migrate Drupal and Migrate Drupal UI). The theme and the custom code you rebuild. Do the migration on Drupal 11, because Migrate Drupal and Migrate Drupal UI are not included in Drupal 12.

Where Drupal 7 stands now

Drupal 7 reached end of life on January 5, 2025. Since then it gets no security or compatibility fixes from the Drupal project. The Drupal Association certified two companies for paid extended support, HeroDevs and Tag1 Consulting, for sites that can't be moved in time. That is a bridge.

Why Drupal 11 and not Drupal 12

The official migration tooling from Drupal 7 lives in two core modules:

  • Migrate Drupal UI, the browser interface at /upgrade, is deprecated as of Drupal 11.3;
  • Migrate Drupal, which holds the actual Drupal 6 and 7 migrations, is deprecated in Drupal 11 as well.

The drupal.org guide for upgrading to Drupal 12 lists both as removed modules, with no contributed version to replace them. A deprecated module still installs and runs on Drupal 11, so migrate now, onto Drupal 11, which is supported until early December 2028. The 11 to 12 upgrade comes later, like any major version update, once your content is already in modern Drupal.

Your options

Option When it makes sense What it involves
Migrate to Drupal 11 A site with many content types, fields, roles, editorial workflows New site, migration with Migrate, rebuilt theme
Rebuild in WordPress A brochure site or blog with a simple structure New site, content imported or copied, a different CMS to learn
Paid extended support You need time for the migration Monthly cost, the same old technology
Static archive A site that is no longer updated Pages saved as HTML, no forms or accounts

For most Drupal 7 sites with a rich structure, Drupal 11 is the natural choice: the content model (types, fields, taxonomies) is similar and the migration tools carry it over. If the site is small, read the Drupal vs WordPress comparison before you choose.

Step 1: inventory the Drupal 7 site

Before installing anything, write down what the site has:

  • the content types and the fields of each;
  • the taxonomy vocabularies;
  • the roles and permissions;
  • the active contributed modules and, for each, whether there is a Drupal 11 equivalent;
  • the custom modules and themes;
  • the views (Views), blocks and menus;
  • the languages, if the site is multilingual;
  • the number of nodes, users and files, so you can check at the end.

The module list decides the effort. A Drupal 7 module that has a Drupal 11 version usually brings its own migration. One with no equivalent means code you write yourself.

What migrates automatically and what doesn't

Migrate Drupal covers what was core in Drupal 7, plus contributed modules that ship their own migrations:

  • migrated: nodes and revisions, users and roles, taxonomies, comments, files, menus, URL aliases, basic site configuration, fields and content types;
  • usually rebuilt by hand: views, the arrangement of blocks and pages, configuration of modules with no migration path;
  • never migrated: the theme (Drupal 11 uses Twig, Drupal 7 used PHPTemplate) and custom code, which is rewritten against the new APIs.

Before you start, the /upgrade interface shows the list of modules that will be migrated and those with no migration path. Read it carefully: it's the best estimate of the work left.

Modules with no Drupal 11 equivalent

Some contributed modules that were popular in Drupal 7 moved into core in Drupal 8: Views, Entity Reference, Date (date fields), Link, Telephone, Media and the CKEditor editor. For these you don't need anything extra; the core migration covers most of them.

For the rest you have three options, in order of effort:

  1. a Drupal 11 module that does the same thing and has a migration from Drupal 7 (check the project page);
  2. a different module, with the data moved by a migration you write in YAML with the Migrate API;
  3. drop the feature, if nobody uses it. An inventory often turns up modules that have been enabled for years and that no one uses anymore.

Step 2: the new Drupal 11 site

  1. Install a clean Drupal 11 as a Composer project (composer create-project drupal/recommended-project).
  2. Install the contributed modules that match the Drupal 7 ones before migrating, so their migrations are available.
  3. Don't create content on the new site. The migration expects an empty site, otherwise IDs can collide.
  4. Enable the migration modules: drush pm:install migrate migrate_drupal migrate_drupal_ui -y.

Step 3: run the migration

The migration needs access to two things from the old site:

  • the Drupal 7 database, through a user, password and host; the simplest way is to import a copy of it on the same server as the new site;
  • the public files (usually sites/default/files): you give either the server folder containing the old site (with the sites/default/files structure kept) or the old site's address, if it's still online.

In the browser, open /upgrade on the Drupal 11 site, enter the Drupal 7 database details and the files path or address, check the module list and start. The process runs in small steps (batch), so it works on large sites too; it just takes time.

For finer control there is a command-line route, with the contributed modules Migrate Upgrade, Migrate Plus and Migrate Tools: drush migrate:upgrade generates the migrations, then you run and check them with drush migrate:status and drush migrate:import. It's useful when you want to export the generated migrations and adjust them in code.

Step 4: check and repeat

Compare the numbers from your inventory with what reached the new site: nodes per type, users, files, terms. Open a few old articles with images and internal links. Check a few migrated user accounts and their roles too.

The /upgrade interface also offers an incremental migration: after the first run, you can bring over only content that is new or changed on the old site. That lets you spend weeks on the theme and views, then pull in the last changes at the end.

Step 5: theme, views and URLs

  • Build the theme for Drupal 11, starting from a core theme (Olivero) or a maintained base theme. You can keep the design, not the theme files.
  • Rebuild views in Views, which has been part of core since Drupal 8.
  • URL aliases are migrated. For any addresses that do change, install the Redirect module and add 301 redirects so you keep your Google rankings.

Step 6: launch

  1. Freeze content on the Drupal 7 site (no new articles).
  2. Run the last incremental migration.
  3. Check the important pages and forms once more.
  4. Point DNS to the new site and issue the SSL certificate.
  5. Keep the Drupal 7 database and a copy of the files for a few months, in case you find something missing.

After launch, uninstall the migration modules: drush pm:uninstall migrate_drupal_ui migrate_drupal -y. You no longer need them, and they won't exist in Drupal 12.

Frequently asked questions

Can I go from Drupal 7 to 10 and then to 11?

You can migrate from Drupal 7 to Drupal 10, but there's no point: Drupal 10 reaches end of life on December 9, 2026. Migrate straight to Drupal 11.

How long does a Drupal 7 to 11 migration take?

It depends on how many contributed modules have no equivalent, on custom code and on how complex the theme is. The inventory from step 1 and the list in /upgrade give you a realistic estimate before the actual work starts.

Do page addresses stay the same?

URL aliases (for example /about-us) are migrated with the content. Internal /node/123 addresses stay the same only if IDs are kept, which happens when you migrate into an empty site. For any address that still changes, add a 301 redirect.

Migrating on AYT hosting

On AYT, the Drupal Toolkit installs the latest Drupal 11 release in one click, as a Composer project with drush and the web root in /web. To migrate:

  1. Create the Drupal 11 site from Create a New Domain, choosing Drupal.
  2. On the Databases page, create another database with its user and import the Drupal 7 database copy into it through phpMyAdmin.
  3. Upload the old site's files via FTPS or the File Manager into a folder of your account, keeping the structure (for example d7/sites/default/files).
  4. In the Drupal Toolkit, on the Commands page, run pm:install migrate migrate_drupal migrate_drupal_ui -y.
  5. Open /upgrade on the new site and enter the imported database's details (host localhost) and the path of the d7 folder.

The Databases page in the AYT panel

Commands are limited to 120 seconds, so use the browser interface for the migration, since it works in small steps. There is no SSH, so the drush migrate:upgrade route only suits small sites. On paid plans you can work on a staging copy and have daily backups. See the supported apps and the plans.

More articles

All articles