Are the site's organic rankings falling after a platform move, or is the migration still sitting in planning with unanswered SEO risks? Migrating legacy Drupal 7 or 8 sites is a high-stakes operation: URL structure, redirects, metadata, and file paths are common failure points that lead to ranking drops. This resource delivers a compact path to move from audit to launch while preserving existing SEO equity.
Key takeaways: migrating legacy Drupal (7/8) sites with SEO preservation in 60 seconds
- Inventory everything first. Track every URL, meta tag, redirect, and backlink before touching the live site.
- Map old URLs to final URLs with a single canonical redirect plan. Use a CSV redirect map and import into Drupal Redirect or server rules.
- Keep content parity and metadata intact. Preserve title tags, meta descriptions, structured data, and hreflang on migrated nodes.
- Validate with data-driven tests before and after launch. Use Search Console, server logs, and rank tracking to confirm parity.
- Have a rollback and monitoring playbook. A short rollback window and automated monitoring avoid prolonged ranking exposure.
Step-by-step Drupal migration for beginners
Step 1: scope and inventory
- Export a complete URL list from the current site (sitemap, CMS export, link crawler). Use tools like Screaming Frog or the server log. Collect: URL, status code, canonical, title, meta description, H1, content length, inbound links count.
- Export Search Console coverage and performance reports (last 90 days) and keep a copy. Include queries that drive impressions for target pages.
- Capture robots.txt, sitemap.xml, canonical rules, and any server-level rewrites.
Step 2: choose the migration target and hosting plan
- Decide whether to migrate to Drupal 9/10 or a managed Drupal platform. Hosting decisions impact speed (TTFB), caching, and uptime, all SEO-relevant.
- For small sites, a mid-tier VPS or managed cloud instance with PHP-FPM + Redis and HTTP/2 is usually sufficient.
Step 3: prepare a staging environment that mirrors production
- Replicate URLs and paths exactly on staging. Use the same domain via hosts file mapping or a staging subdomain with identical routing.
- Configure PHP and web server settings to match production and enable developer tools: Xdebug, drush, and composer.
- Required Composer commands (example):
composer require drupal/migrate_plus drupal/migrate_tools drupal/migrate_upgrade drupal/pathauto drupal/redirect drupal/metatag drupal/simple_sitemap
- Enable modules with Drush:
drush en migrate_plus migrate_tools migrate_upgrade pathauto redirect metatag simple_sitemap -y
Step 5: build content and URL mappings
- Create a CSV redirect map with columns: old_url,new_url,redirect_type,comment
- Example rows:
/old-category/product-1,/products/product-1,301,mapped from D7 node/123
/old-page,/about-us,301,consolidated content
- Import redirects using Redirect Import (or write a short Drush script to insert into redirect table). Keep one-to-one mappings where possible.
Step 6: migrate files, users, taxonomy, and content
- Use migrate_upgrade or custom migration YAMLs to map D7 fields to D9 fields. Prioritize content types that drive traffic first.
- Migrate public files by copying the sites/default/files folder and updating file_managed entries if needed.
- Ensure Metatag fields are migrated and populated. Check schema.org markup output for key templates (article, product, organization).
- Run Lighthouse audits on a sample of top pages. Address critical issues that can affect Core Web Vitals: Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), First Input Delay (FID)/INP.
Step 9: pre-launch validation checklist
- Verify redirect CSV imported successfully.
- Confirm sitemap generation and robots.txt behavior.
- Validate canonical tags and hreflang if used.
- Crawl staging with Screaming Frog and compare counts to the inventory.
Step 10: launch window and immediate post-launch checks
- Launch during a low-traffic window and switch DNS with a short TTL.
- Run real-time checks: index status in Search Console, server logs for 4xx/5xx spikes, and a quick site:domain check to ensure critical pages are present.
Step by step Drupal 7 site migration
Pre-migration preparation specific to Drupal 7
- Audit contributed modules used in D7. Identify replacements in Drupal 9/10. Document custom modules and hooks that affect output (clean URLs, rewrites, or custom path logic).
- Export path aliases from the D7 database: SELECT source, alias FROM url_alias WHERE language = 'und' OR language IS NULL;
- Export menu links, taxonomy term IDs and their URL aliases to maintain mapping.
Migration commands and YAML example
- Use drush migrate-upgrade for direct D7 -> D9 skeleton migrations: drush migrate-upgrade --legacy-db-url=mysql://user:pass@localhost/dbname --legacy-root=/path/to/drupal7 --configure-only
- Example minimal migration YAML (nodes):
id: migrate_d7_node_page
label: 'D7 pages'
source:
plugin: d7_node
node_type: page
process:
nid: nid
title: title
body: body/value
body_format: body/format
path: path/alias
destination:
plugin: 'entity:node'
default_bundle: page
- Run migrations with drush migrate-import --group=custom or drush mi migrate_d7_node_page
Files and private file handling
- Copy files and ensure file URIs update. If files move to a new path prefix, update file_managed records or use a migration source plugin mapping.
How to fix broken Drupal redirects after migration
Diagnostics first
- Use logs: check /var/log/nginx/error.log and access logs for 404 spikes. Export Search Console coverage reports and filter for 404s.
- Run a full crawl and produce a list of 4xx pages prioritized by inbound links and organic sessions.
Common fixes
- If redirects exist in the Redirect module but still show 404s, ensure the module's redirect table (redirect) has matching source values and language columns.
- For bulk corrections, import a CSV into Redirect using Redirect Import or run a SQL insert:
INSERT INTO redirect (redirect_source, redirect_redirect, status_code) VALUES ('/old-path','/new-path',301);
(Always backup the DB before any direct inserts.)
Server-level fallbacks
- For very old backlinks or performance-sensitive redirects, place high-volume redirects at the server level (Nginx rewrite) before Drupal boot to reduce PHP overhead. Example Nginx rule:
rewrite ^/old-path$ /new-path permanent;
Regex and priority
- Use precise rules first, then generic patterns. Avoid open-ended regex that accidentally matches valid pages.
Drupal 7 vs Drupal 9 SEO impact
| SEO factor |
Drupal 7 |
Drupal 9/10 (modern) |
| URL handling and routing |
Old path alias system, more custom handling |
Symfony-based routing, cleaner route system, stable path alias APIs |
| Performance tools |
Limited core caching; relies on contrib |
Improved caching, BigPipe, better cacheable render arrays |
| Theming and HTML output |
PHPTemplate, heavier markup |
Twig with clearer templates and easier microdata insertion |
| Structured data |
Manual or contrib modules |
Easier integration with Metatag and schema outputs |
| Module ecosystem |
Many legacy modules, fragmentation |
Modern modules, composer-first ecosystem, more security updates |
Practical takeaway: migrating to Drupal 9+ generally improves performance and future security, but migration work must preserve URLs and metadata; otherwise gains are negated by ranking loss.
Simple guide to Drupal 7 migration plugins and modules
- Migrate (core in later versions), foundation for migrations.
- Migrate Plus, adds sources and process plugins. Migrate Plus
- Migrate Tools, Drush integration for running and rolling back migrations. Migrate Tools
- Migrate Upgrade, helper for automatic upgrades from D7 to D9. Migrate Upgrade
- Pathauto, preserve and generate SEO-friendly aliases.
- Redirect, central place for redirect management. Supports import from CSV.
- Metatag, migrate meta titles and descriptions and canonical tags.
- Simple XML Sitemap, generate sitemaps for search engines.
Composer-first install and version pinning are critical to ensure reproducible builds.
Migration workflow: inventory → migrate → validate
🔍Step 1 → inventory URLs, sitemaps, backlinks
🛠️Step 2 → build mapping and staging site
🔁Step 3 → migrate content, files, metadata
✔️Step 4 → validate redirects, sitemaps, CWV
📈Step 5 → launch + monitor & rollback plan
Signs your Drupal SEO broke after move
- Significant organic traffic drop (>10% week-over-week) concentrated on migrated pages.
- Coverage errors or spikes in 4xx/5xx in Google Search Console after the launch.
- Major loss of impressions or clicks for high-volume queries in Search Console.
- Backlinks leading to 404s (use Ahrefs/Majestic or server logs to identify).
- Missing meta titles or meta descriptions on migrated templates.
Quick checks: run a site: operator for top keywords, spot-check top landing pages, and compare page-level sessions in Google Analytics or server logs.
Why Drupal migration causes ranking drops (and how to prevent them)
- URL changes without proper 301 redirects. Prevention: map every indexed URL to its new destination and implement one-to-one 301 redirects.
- Loss of unique content or consolidation without canonical handling. Prevention: maintain content parity and use 301s or canonical tags for consolidated pages.
- Metadata missing or replaced by defaults. Prevention: migrate Metatag values and audit templates.
- Crawlability issues (robots.txt, noindex applied inadvertently, sitemap missing). Prevention: keep robots.txt consistent, verify sitemaps and remove noindex tags before launch.
- Core Web Vitals regression due to different hosting or theme changes. Prevention: baseline CWV metrics and test on staging.
Drupal migration cost for small sites
- Cost depends on complexity. Typical budget items:
- Audit & planning (4–8 hours), $300–$1,000
- Development (migrations, mapping, testing), 10–40 hours, $1,000–$6,000
- Hosting & infrastructure changes, $20–$200/month depending on provider
- Post-launch monitoring and fixes, 4–12 hours, $300–$1,500
Small brochure sites (under 100 pages) often fit a $1,200–$3,000 budget if no heavy custom modules exist. Complex sites with custom entities or large file sets increase costs.
Post-migration testing and monitoring playbook
- 0–24 hours: crawl home and top landing pages, check Search Console index coverage, monitor error logs for spikes.
- 24–72 hours: compare organic sessions by page to previous period; check top queries.
- 7–30 days: full audit for lost backlinks, ranking variance, and traffic trends. A temporary ranking shift is normal within 7–14 days; persistent drops require rollback or fixes.
Datasets, scripts and templates to use
- Redirect CSV template: old_url,new_url,code,notes
- Drush commands: drush mi --group=custom, drush migrate-status, drush migrate-rollback
- SQL excerpt to export aliases from D7: SELECT source, alias FROM url_alias;
Datasets to share with stakeholders (recommended)
- Pre-launch URL inventory CSV (with traffic and backlinks columns).
- Redirect CSV prepared for import.
- Migration runbook with timestamps, DNS TTLs and contact list.
Common rollback playbook
- Repoint DNS to previous host (if available) or restore database and files from backup.
- Re-apply previous robots.txt and sitemap.
- Re-enable old redirects if server-level redirect management was switched.
Quick rollback tip
Keep a 48–72 hour rollback window where backups and older environment remain live until Search Console and traffic signals stabilize.
Lo que otros usuarios preguntan about migrating legacy Drupal (7/8) sites with SEO preservation
How to map 1:1 redirects quickly?
Create a CSV of old_url → new_url and import into the Redirect module or generate server-level rules for high-volume cases. Prioritize pages by traffic and backlinks.
Why did organic traffic drop after migrating Drupal 7 to 9?
Traffic drops usually trace to missing redirects, noindex/canonical errors, or a change in page speed affecting Core Web Vitals. Check Search Console and server logs immediately.
Metatag plus Migrate modules (Migrate Plus / Migrate Tools) allow mapping title and description fields into the Metatag entity on the destination.
Move high-traffic redirects to the web server (Nginx) and keep bulk or low-traffic redirects in the Redirect module. Server-level redirects execute before PHP and scale better.
Which metrics to monitor after migration?
Monitor: organic sessions, Google Search Console coverage & performance, 404/500 server logs, Core Web Vitals on representative pages.
Final checklist before launching
- Redirects imported and spot-checked (top 100 pages)
- Sitemap generated and submitted to Search Console
- Robots.txt matches previous rules
- Metadata migrated and present on key templates
- Lighthouse/CWV baseline checks passed on top landing pages
- Monitoring and rollback plan in place
Your next steps to protect SEO after migration
- Export the site's top 50 landing pages and confirm their redirects are one-to-one in the redirect CSV.
- Run a staging crawl and compare indexable page count vs. production inventory; fix mismatches.
- Set up Search Console and 3rd-party rank tracking to monitor the first 14 days post-launch.