Migrate Redirect Map builds the 301 redirects a Drupal 7 to Drupal 10/11 migration needs and shows you, before launch, which legacy URLs would return 404.
Migrate Drupal moves the content but not the addresses. This module reads the migrate map tables of your node, term, user and media migrations, the legacy url_alias table and the legacy Redirect table, resolves every old path to the new entity's alias, and classifies each one. A dry run gives you the full report as a CSV download; one more click (or one Drush command) creates the redirects in batches. Every redirect is validated before it is saved, so there are no duplicates and no loops.
What each legacy URL is reported as
- redirect: the URL changed, so a redirect is created
- identical: the URL is unchanged, nothing to do
- exists: a redirect for that URL already exists, enabled or disabled
- conflict: the URL is live on the new site (an alias of other content, a node or term that reuses the legacy ID, or a route such as
user/login), so it is skipped rather than hidden behind a redirect - duplicate: another legacy entry already claims the same URL and language; the first one wins
- external: a legacy redirect to another website, created only if you opt in
- unresolved: no migrated entity matches; this URL would 404
Features
- Handles core
d7_node_complete:bundlemigrations and theupgrade_d7_*migrations created by the Migrate Drupal UI - Follows Drupal 7 translation sets, so translated nodes land on their migrated source node
- Re-points redirects the Drupal 7 site already had, with their query strings, fragments and status codes
- Recreates redirects to external http and https URLs only when you ask;
javascript:,data:,mailto:and protocol-relative targets are never created - Per-language aliases; languages the new site does not have become language-neutral redirects
- Unresolved paths (views, custom callbacks, files) are listed, never guessed
- Admin UI at Configuration » Search and metadata » Migration redirect map: the map is built and the redirects are created in batches, so large sites do not time out
drush migrate-redirect-map:build, which asks before it writes (-yfor scripts)- CSV download of the whole map for sign-off before launch, safe to open in a spreadsheet
- Its own restricted permission, Build migration redirect maps, for trusted administrators
Requirements
Drupal 10.3+ or 11, the Redirect module (1.9 or later), and the migrate database connection Migrate Drupal already uses. Drush 12.5+ or 13 for the command (optional).
Usage
Run it after the content migrations and after the new aliases exist. Dry run first, read the unresolved and conflict rows, then create. Full instructions are in the README.
Maintained by Gspikes, who run Drupal 7 to 11 migrations and publish the State of Drupal 7 census.
Project information
- Project categories: Developer tools, Search engine optimization (SEO)
- Created by shaker-gspikes on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.