wp_drupal_migrate
Introduction / Summary
Summary
Migrate WordPress content to Drupal via direct database connection. Import users, posts, pages, categories, tags, media, and comments with an easy-to-use admin UI.
Full Introduction
Moving from WordPress to Drupal? This module provides a streamlined migration path by connecting directly to your WordPress MySQL database.
Instead of dealing with XML exports or manual content transfers, WordPress to Drupal Migrate reads your WordPress data in real-time and creates equivalent Drupal entities - users, nodes, taxonomy terms, media, and comments.
Perfect for site builders who need to migrate an existing WordPress site to Drupal without losing content or spending hours on manual data entry.
Features
-
Direct Database Connection:
Connects directly to your WordPress MySQL database - no XML exports needed. Fast, reliable, and handles large sites efficiently. -
Comprehensive Content Migration:
- Users (including first name, last name, and bio metadata)
- Categories → Drupal taxonomy terms (hierarchical structure preserved)
- Tags → Drupal taxonomy terms
- Posts → Article content type
- Pages → Basic Page content type
- Media / Attachments → Drupal Media entities
- Comments (threaded comment structure maintained)
-
User-Friendly Admin Interface:
Configure database credentials and run migrations from the Drupal admin UI- no command line required. -
Flexible Migration Options:
- Skip media migration when not needed or if files are unavailable
- Update existing records to re-sync content
- Rollback migrations to undo imports
-
WordPress Content Cleanup:
Automatically converts common WordPress shortcodes to HTML and cleans up WordPress-specific markup. - Drush Support: Full Drush integration for advanced users and automated workflows.
- Extensible: Easily add custom migrations for WordPress custom post types and custom taxonomies.
Use Cases
- Migrating a corporate WordPress site to Drupal for better enterprise features
- Moving a WordPress blog to Drupal to leverage its content modeling capabilities
- Consolidating multiple WordPress sites into a single Drupal multisite installation
- Agencies transitioning client sites from WordPress to Drupal
Post-Installation
After enabling the module:
-
Configure Database Connection:
Navigate to Configuration → Content authoring → WordPress Migration
(/admin/config/content/wp-migrate) and enter:- Database host, port, name, username, and password
- WordPress table prefix (default:
wp_) - WordPress uploads URL (for media migration)
-
Test Connection:
Click Test Connection to verify Drupal can reach your WordPress database. -
Run Migrations:
Go to Configuration → Content authoring → WordPress Migration → Execute Migrations
(/admin/config/content/wp-migrate/execute).
Select specific migrations or use Import All. -
Review Content:
Verify imported content under Content, Media, People, and Taxonomy.
Note: The module creates two taxonomy vocabularies (Categories and Tags) during installation to match WordPress’s default taxonomy structure.
Additional Requirements
- Drupal 10 or 11
- PHP 8.1+
- migrate_plus – Additional migration plugins and features
- migrate_tools – Drush commands for migration management
- MySQL access to your WordPress database (Drupal must be able to connect to it)
Recommended Modules / Libraries
-
migrate_upgrade
– Useful if migrating from an older Drupal version alongside WordPress -
media_migration
– For advanced media handling scenarios -
pathauto
– Automatically generate URL aliases for migrated content
Similar Projects
-
wordpress_migrate
– Imports WordPress content via WXR (XML) exports. Use this if direct database access is not possible.
This module differs by using a live database connection, which is faster for large sites. -
feeds
– Imports content from RSS/Atom feeds. Useful for syndication but less comprehensive than a full migration.
Supporting This Module
If this module saves you time, consider:
- Contributing bug reports and patches
- Writing documentation or tutorials
- Sponsoring development of new features