This project is not covered by Drupal’s security advisory policy.
Migrates a WordPress site to Drupal by reading the WordPress database directly. No XML export, no plugin to install on the WordPress side. Run it from an admin page or with Drush.
What it migrates
- Content: posts, pages and custom post types, with categories, tags, featured images and the WordPress URL as the path alias.
- Gutenberg and classic content: block editor markup is converted to clean HTML; reusable blocks are expanded and embeds become links.
- Media: images, documents, video and audio, each to its own media type. Files are copied from a local copy of
wp-content/uploads(fast) or downloaded. Optionally only the media your content actually uses. - Users: with their WordPress passwords (including WordPress 6.8+ hashes) and roles.
- Menus with their hierarchy, comments (threaded), taxonomy.
- SEO: Redirection plugin redirects and Yoast SEO titles and descriptions (to Metatag).
- Page builders and plugins: WPBakery content to Paragraphs (submodule), WP Store Locator stores.
Running migrations
- Admin UI at Configuration > Content authoring > WordPress Migration: connect, test the connection, then import or roll back selected migrations as a batch, in dependency order.
- Drush: all migrations are in the
wordpressgroup:drush migrate:import --group=wordpress --execute-dependencies. - Incremental runs: during a content freeze, only import what changed in WordPress since the last run.
- Large sites are fine: rollbacks run in batches, and totals are cached.
Built to be adapted
The module ships source and process plugins plus starter migrations. Real sites usually copy the starter migrations into their own module and change the field mapping. Starter migrations that need a module or media type your site doesn't have are skipped, with the reason shown. See the README for every plugin and option.
Requirements
- Drupal 10.3 or 11, PHP 8.1+
- Migrate Plus and Migrate Tools
- Read access from Drupal to the WordPress MySQL database
Optional modules
- Redirect: WordPress redirects
- Metatag: Yoast SEO data
- Paragraphs: WPBakery content
- Address and Geofield: store locations
- Pathauto: URL aliases for new content after the migration
Getting started
composer require drupal/wp_drupal_migrateand enable the module.- Declare the WordPress database in
settings.phpas$databases['wordpress'](recommended), or enter it at/admin/config/content/wp-migrate. - Set the uploads path or URL for media.
- Run the migrations at
/admin/config/content/wp-migrate/execute, or with Drush.
Similar projects
WordPress Migrate imports a WordPress XML (WXR) export. Use it when you can't reach the WordPress database. This module reads the database itself, so it also gets data the export leaves out (plugin tables, post meta, password hashes) and handles large sites well.
Project information
- Project categories: Import and export, Integrations
28 sites report using this module
- Created by talishkhan on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
