Drupal Module Enables Direct WordPress Database Migration Without WXR Files

Talish Khan Publishes Direct Database Migration Module for WordPress-to-Drupal Transitions

A contributed Drupal module, wp_drupal_migrate, introduces a method for migrating content directly from a live WordPress database into Drupal using the Migrate API. The approach bypasses the traditional WXR export process, allowing Drupal to read from the source database without relying on intermediate files and shifting the migration workflow toward live data access.

The module connects to a WordPress MySQL database as a secondary Drupal database connection and executes migrations as standard Drupal migration plugins. Content is imported as native Drupal entities, including users, posts, pages, taxonomy terms, media, comments, and menu links, with support for metadata preservation and structured mapping between systems.

Each migration supports rollback, re-import, and iterative updates, enabling workflows that operate on the current source of truth rather than static export snapshots. The process can be managed through Drupal’s administrative interface or via Drush commands for automated and scripted execution.

The approach addresses limitations associated with WXR-based migrations, where large exports may truncate, media references may be incomplete, and repeated migrations require regenerating files. By operating directly on the database, the module reduces dependency on file-based intermediaries and improves consistency across migration runs.

The module is designed for environments where the WordPress database is accessible from Drupal and where content structures map cleanly to Drupal entities. It is less suitable for sites that rely heavily on custom plugins with complex or serialised data, where additional transformation logic would still be required.

The module is available on Drupal.org. The project is maintained by Talish Khan, who has outlined the module’s approach and invited community contributions for extending field mappings. Documentation also notes that the project is not covered by Drupal’s security advisory policy, placing responsibility for evaluation and use on implementers.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Related People

Upcoming Events

Latest Opportunities