Problem/Motivation

22 March 2026: This seems to be caused by requirements getting ignored if Migrate Tools is installed. Use the dev-version of Migrate Tools until a fresh version is released, or don't install "WordPress Migrate UI" which requires Migrate Tools.
#3572002: migration_dependencies.optional ignored since 6.1.3

13 May 2026 Migrate Tools 6.1.4 has been released: Migrate Tools 6.1.4

Thanks for the fresh release, and Drush 13 support!

I wanted to update https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... and went through the steps. All worked well, until I ran into an error when I ran this command:

$ drush migrate:import --all
[error] Migration my_wordpress_comment_post did not meet the requirements. Missing migrations my_wordpress_content_post. In MigrateToolsCommands.php line 1184: my_wordpress_comment_post migration failed.

It seems to block other migrations from completing, and I needed to click "Execute" via the GUI for those migrations to run.

Also, it seems that if I run drush migrate:import my_wordpress_comment_page first, it seems to take care of the problem.

But ideally, it would be nice if drush migrate:import --all could complete without errors.

Steps to reproduce

GUI created migration

  1. Go through steps on https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib...
  2. Try to run drush migrate:import --all and get an error

Drush created migration

  1. Create the migration with Drush (and not via the GUI) but otherwise, use the same set up as https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib....

    Place the export file in the root of the installation, and run this Drush command, to direct all content to the "Article" content type:

    drush wordpress-migrate-generate /var/www/html/my_wp_export_03_15.xml \
    --group-id=my_wp \
    --prefix=my_ \
    --base-url=http://ddev-wp-web \
    --category-vocabulary=tags \
    --tag-vocabulary=tags \
    --image-field=field_image \
    --page-type=article \
    --page-body-field=body \
    --page-text-format=full_html \
    --post-type=article \
    --post-body-field=body \
    --post-text-format=full_html
  2. Try to run imports via GUI or Drush and see errors.

    "categories from WordPress XML blog_wordpress_categories" are imported via GUI or Drush into "Tags", so the file can be seen, and content imported:

    Status message
      Processed 31 items (31 created, 0 updated, 0 failed, 0 ignored) - done with 'blog_wordpress_categories'

    Nodes (like "Import content from WordPress XML blog_wordpress_content_post") are not getting created:

    Status message
    Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'blog_wordpress_attachments'
    Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'blog_wordpress_categories'
    Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'blog_wordpress_tags'
    Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'blog_wordpress_content_post'

    From the error log:
    Missing bundle for entity type node (/var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php:132)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ressa created an issue. See original summary.

hongpong’s picture

Thanks for testing this new kaboodle!!

Enable configuration manager core module and try checking the configuration entities: /admin/config/development/configuration . Go into Migration then Configuration name down to the problem one.

I think if you can examine the entities at /admin/config/development/configuration/single/export/migration/my_wordpress_comment_post or similar that would be helpful.

when i do it by gui the only migration_dependencies for post are

migration_dependencies:
  required:
    - wordpress2222wordpress_attachments
include: null

my hunch is that yours is not like this perhaps. Generally the fault would be around in there.

( I updated our issue template to point attention to checking in this)

... Upon more checking when I try running that command I am also getting odd migration jobs that are not even ones that are named in my system . So something is hinky for sure. drush migrate:import --all -vvv for verbose output.

ressa’s picture

Thanks for a fast reply!

I checked under that path, and this is what I see:

idMap: {  }
migration_dependencies:
  required:
    - my_wordpress_content_post
include: null

I did not include it, but this a plain vanilla Drupal 11.3.5, built with the steps from the DDEV Quickstart, in case it makes a difference.

I originally generated content with FakerPress of Users, Terms as well as Posts, Attachments and Comments. Second time, I did not generate Comments, but still saw the issue. Maybe you could try with all possible types of content, comments, etc. as well?

Under the Migrate Wizard settings I chose "Tags" for all tags, used the "Article" content type for both "Posts" and "Pages", and "Full HTML" for format. If it's useful I can easily supply a more detailed list of the options I used, just let me know, or if you need anything else.

hongpong’s picture

I also used ddev and approximately get the same thing I think. We will probably need to hook into more logging to understand WTF is going on here. ( with luck maybe I can get some more on this saturday at the drupal meet in NJ)

update - also unless i missed it we do not enforce comments module being turned on which might be affecting the comment import gizmo. especially drush would not have any check on this.

ressa’s picture

Yes, the comment module was also on my radar. So I checked, and it's installed by default in a fresh Drupal 11 installation ("plain vanilla Drupal 11.3.5, built with the steps from the DDEV Quickstart") and a Comment field is included for the Article content type.

So Drupal seems ready to accept comments.

Eventually, it would be nice if importing comments could be optional, but getting it to work would be a great first step, and optional comment import can always be dealt with in a follow up issue, if it's relevant.

It sounds fantastic that you may be able to take a closer at this with other Drupalers, have a nice weekend.

ressa’s picture

Issue summary: View changes

I wanted to try to automate the configuration process with Drush, and it works partially, but is slightly more fragile than via GUI configuration.

I placed the export file in the root of the installation, and used this Drush command to direct all content to the "Article" content type:

drush wordpress-migrate-generate /var/www/html/my_wp_export.xml \
--group-id=old_blog \
--prefix=blog_ \
--tag-vocabulary=tags \
--category-vocabulary=tags \
--post-type=article \
--image-field=field_image \
--post-text-format=restricted_html \
--page-type=article \
--page-text-format=full_html \
--base-url=http://ddev-wp-web

I can import "categories from WordPress XML blog_wordpress_categories" just fine via GUI or Drush, the categories get imported into "Tags", so the file can be seen, and content imported:

Status message
  Processed 31 items (31 created, 0 updated, 0 failed, 0 ignored) - done with 'blog_wordpress_categories'

But nodes (like "Import content from WordPress XML blog_wordpress_content_post") are not getting created. I see this:

Status message
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'blog_wordpress_attachments'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'blog_wordpress_categories'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'blog_wordpress_tags'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'blog_wordpress_content_post'

... and in the in the error log:
Missing bundle for entity type node (/var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php:132)

I added this additional Drush configuration observation in the Issue Summary as well, under "Steps to reproduce".

ressa’s picture

Issue summary: View changes

Fix Issue Summary markup.

ressa’s picture

Issue summary: View changes
ressa’s picture

Just another observation. I tried creating the same migrations as identical as possible (first GUI) and this is what I see when I export the configuration made with Drush. It looks like the only difference is this (twice), not included when using Drush:

-  body: '@_content'
-  _content/format:
-    plugin: default_value
-    default_value: basic_html
-  type:
-    plugin: default_value
-    default_value: article 

... and the way the path to the import file is stored:

     urls:
-      - 'public://my_wp_export_1.xml'
+      - /var/www/html/my_wp_export.xml

The full feedback:

$ drush config:export --diff
 [notice] Differences of the active config to the export directory:
diff --git a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_attachments.yml b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_attachments.yml
index 9c6c2219..d254bbe9 100644
--- a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_attachments.yml
+++ b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_attachments.yml
@@ -1,4 +1,4 @@
-uuid: 26985cdf-03dc-4b49-976d-382df86530c9
+uuid: 481290b6-0044-4f8f-b7c3-f032eb26e0c1
 langcode: en
 status: true
 dependencies: {  }
diff --git a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_authors.yml b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_authors.yml
index 29eb701c..0dc436da 100644
--- a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_authors.yml
+++ b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_authors.yml
@@ -1,4 +1,4 @@
-uuid: ea1bd207-2439-476c-af27-50775b08bfe8
+uuid: 9a97d3f8-1119-4494-a708-5d8c506da2fc
 langcode: en
 status: true
 dependencies: {  }
diff --git a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_categories.yml b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_categories.yml
index ebe3ed0d..175b5389 100644
--- a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_categories.yml
+++ b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_categories.yml
@@ -1,4 +1,4 @@
-uuid: 3991df1f-6b0e-4c6f-a6f2-0c08b307a33f
+uuid: fba2fb75-d37d-4520-809e-df858a28e3b3
 langcode: en
 status: true
 dependencies: {  }
diff --git a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_comment_page.yml b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_comment_page.yml
index 07b7a47e..a3612221 100644
--- a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_comment_page.yml
+++ b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_comment_page.yml
@@ -1,4 +1,4 @@
-uuid: 5a449021-f13a-4b88-968f-daa0eba7b6ee
+uuid: a7600a5f-07dc-48dd-bba3-473b62cfaa97
 langcode: en
 status: true
 dependencies: {  }
diff --git a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_comment_post.yml b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_comment_post.yml
index 583d59e8..89b95dc6 100644
--- a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_comment_post.yml
+++ b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_comment_post.yml
@@ -1,4 +1,4 @@
-uuid: 635c32cc-d26c-461b-9d06-aa06835f9288
+uuid: 9831f3e7-eb70-4501-b26f-a2698df343b0
 langcode: en
 status: true
 dependencies: {  }
diff --git a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_content_page.yml b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_content_page.yml
index 473f52a8..bff98366 100644
--- a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_content_page.yml
+++ b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_content_page.yml
@@ -1,4 +1,4 @@
-uuid: fffbd3d9-f837-4724-bc5e-637775fc2d68
+uuid: f325dae6-2fce-471d-af1e-aa31aa7db40d
 langcode: en
 status: true
 dependencies: {  }
@@ -123,13 +123,6 @@ process:
     plugin: migration_lookup
     migration: my_wordpress_authors
     source: creator
-  body: '@_content'
-  _content/format:
-    plugin: default_value
-    default_value: basic_html
-  type:
-    plugin: default_value
-    default_value: article
   field_tags:
     plugin: migration_lookup
     migration: my_wordpress_categories
diff --git a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_content_post.yml b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_content_post.yml
index e5f4df24..1a4abfbb 100644
--- a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_content_post.yml
+++ b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_content_post.yml
@@ -1,4 +1,4 @@
-uuid: cb95ed06-f267-44ab-ab9b-fda10ddbd409
+uuid: 4ff6592b-9456-41cc-9751-1b2ea0f03063
 langcode: en
 status: true
 dependencies: {  }
@@ -123,13 +123,6 @@ process:
     plugin: migration_lookup
     migration: my_wordpress_authors
     source: creator
-  body: '@_content'
-  _content/format:
-    plugin: default_value
-    default_value: basic_html
-  type:
-    plugin: default_value
-    default_value: article
   field_tags:
     plugin: migration_lookup
     migration: my_wordpress_categories
diff --git a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_tags.yml b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_tags.yml
index 7032f3e1..22507b85 100644
--- a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration.my_wordpress_tags.yml
+++ b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration.my_wordpress_tags.yml
@@ -1,4 +1,4 @@
-uuid: e53c2d54-5ceb-437d-baac-18780390040c
+uuid: 6d400fbd-88e4-4567-8cd5-16330c85b518
 langcode: en
 status: true
 dependencies: {  }
diff --git a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration_group.my_wp.yml b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration_group.my_wp.yml
index 0cbd5022..e603d119 100644
--- a/tmp/drush_tmp_1773419429_69b43ba5e4c41/migrate_plus.migration_group.my_wp.yml
+++ b/tmp/drush_tmp_1773419429_69b43ba5f1cc9/migrate_plus.migration_group.my_wp.yml
@@ -1,4 +1,4 @@
-uuid: 2d8cc192-4395-4539-ba9a-ccfc00028c8f
+uuid: 6e15cef3-9bc2-4622-8c71-0fa4d1da7ef9
 langcode: en
 status: true
 dependencies: {  }
@@ -16,4 +16,4 @@ shared_configuration:
       wfw: 'http://wellformedweb.org/CommentAPI/'
       dc: 'http://purl.org/dc/elements/1.1/'
     urls:
-      - 'public://my_wp_export_1.xml'
+      - /var/www/html/my_wp_export.xml


 ┌ The .yml files in your export directory will be deleted and replaced with the active config. ┐
 │ ● Yes / ○ No                                                                                 │
 └──────────────────────────────────────────────────────────────────────────────────────────────┘
  Target: ../config
hongpong’s picture

Really good digging. I have added the missing body fields at least into the drush commands - will push on mr here. it still gives me issues. ( this shows the enforcement of migrate order should be working.
Migration mymy1wordpress_comment_post did not meet the requirements. Missing migrations mymy1wordpress_content_post. In MigrateToolsCommands.php line 1184: mymy1wordpress_comment_post migration failed.
I think this could really be a failure in the field mapping inside post migrate. right now I have set post_body_field_type and page_body_field_type to save as null in the config from drush command unless otherwise specified. this value should be updated / passed in by command line. (the new validator function will check these field values and report if its invalid, is my goal)

For starting this MR: I think you will get better results in config though, I now added:

#[CLI\Option(name: 'post-body-field', description: 'Machine name of Drupal field name to hold imported post content.')]
#[CLI\Option(name: 'post-body-field-type', description: 'Machine name of Drupal field type to hold imported post content.')]\
and same for page.

and tweaked for drush:

    $configuration['post']['type']        = $options['post-type'] ?? 'article'; // default Drupal bundle name
    $configuration['post']['text_format'] = $options['post-text-format'] ?? 'basic_html';
    $configuration['post']['body_field']   = $options['post-body-field'] ?? 'body';
    $configuration['post']['body_field_type'] = $options['post_body_field_type'] ?? null; // todo - needs to be set
    $configuration['page']['type']        = $options['page-type'] ?? 'page'; // default Drupal bundle name
    $configuration['page']['text_format'] = $options['page-text-format'] ?? 'basic_html';
    $configuration['page']['body_field']   = $options['page-body-field'] ?? 'body';
    $configuration['page']['body_field_type'] = $options['page_body_field_type'] ?? null; // todo - needs to be set

tree:

 drush migrate:tree
wordpress_categories
wordpress_comment
wordpress_content
wordpress_attachments
wordpress_tags
wordpress_authors
mymy1wordpress_authors
mymy1wordpress_categories
mymy1wordpress_comment_post
└──mymy1wordpress_content_post
   ├──mymy1wordpress_tags
   └──mymy1wordpress_attachments
mymy1wordpress_content_page
└──mymy1wordpress_attachments
wp_2026_03_14__15_17_14_wordpress_authors
wp_2026_03_14__15_17_14_wordpress_categories
wp_2026_03_14__15_17_14_wordpress_comment_post
└──wp_2026_03_14__15_17_14_wordpress_content_post
   ├──wp_2026_03_14__15_17_14_wordpress_tags
   └──wp_2026_03_14__15_17_14_wordpress_attachments
wp_2026_03_14__15_17_14_wordpress_content_page
└──wp_2026_03_14__15_17_14_wordpress_attachments

going to push on the MR and add validator class, and a logging class, and wire into drush first, since it assembles the configuration object, before passing it to the migration generator, we should validate it there. i added some todo comments to show where this would be going. also changing us to require ^6.0.9 migrate_tools to deal with the plugin generator.

hongpong’s picture

I put the validator / logger stuff here - https://git.drupalcode.org/project/wordpress_migrate/-/merge_requests/45 part of issue: #3579149: Create validator classes MigrationConfigurationValidator + ValidationResult

Can be setup to give better logging all around, will go with the validator to catch all the things going on.

ressa’s picture

Thank you so much, it works much better now. Improving (or adding) a better validator/logger feature in the other issue, and adding config options for Body are really great improvements!

drush migrate:import --all still fails, so I do need to perform some extra steps (or at least in the right order) but the process can now be completed, so the rest is details :) ... I'll be ready to test further tweaks to the code:

drush migrate:import --all
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_content'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_tags'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_categories'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_attachments'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_comment'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_authors'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_attachments'
 [notice] Processed 19 items (18 created, 0 updated, 0 failed, 1 ignored) - done with 'my_wordpress_authors'
 [notice] Processed 91 items (91 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_categories'
 [error]  Migration my_wordpress_comment_post did not meet the requirements. Missing migrations my_wordpress_content_post.

In MigrateToolsCommands.php line 1184:
  my_wordpress_comment_post migration failed.

I need to import attachments first (my_wordpress_content_post requires it):
drush migrate:import my_wordpress_attachments

Now I can import posts:
drush migrate:import my_wordpress_content_post

... and I can finally run the full import, without any errors:

drush migrate:import --all
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_content'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_tags'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_categories'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_attachments'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_comment'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_authors'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_attachments'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_authors'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_categories'
 [notice] Processed 31 items (30 created, 1 updated, 0 failed, 0 ignored) - done with 'my_wordpress_comment_post'
 [notice] Processed 2 items (2 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_content_page'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_content_post'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_tags'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_comment_page'
$

The migration is complete, hurray! 🎉

A detail: Is it possible to list the Drush confirmation message like this? (not super important, I just prefer it as compact as possible)

wordpress_migrate: The following migrations have been generated:
- id: my_wordpress_authors
- id: my_wordpress_attachments
- id: my_wordpress_categories
- id: my_wordpress_tags
- id: my_wordpress_content_post
- id: my_wordpress_comment_post
- id: my_wordpress_content_page
- id: my_wordpress_comment_page

... the current format of the list:

wordpress_migrate: The following migrations have been generated:
-
  id: my_wordpress_authors
-
  id: my_wordpress_attachments
[...]

During testing, I was reminded about this ... I may even have created an issue about this before? I just could not find it:
#3579327: HTML in Body field of a migration is not used, until the node is saved

**

I'll share my set up, in case I (or someone else) needs it in the future:

UPDATE 18 march 2026 there has been two great improvements, so updating tips below accordingly:

  1. DDEV no longer requires using Internal Docker Domain (i.e. http://ddev-wp-web)
  2. Body-field is now available in the dev-version (eventually in the official release)

1. SET UP

# install Drupal and modules
drush site:install --site-name=$(basename "$PWD") -y
drush install admin_toolbar admin_toolbar_tools admin_toolbar_search

# create DDEV snapshot
ddev snapshot --name migrate_ready

# Start WordPress DDEV, for example under https://wp.ddev.site and verify access to content
ddev exec curl https://wp.ddev.site | grep "<title>"
ddev exec curl https://wp.ddev.site/wp-content/uploads/2026/03/1dc65fa5-2b44-3666-94e6-7c91e40ad69b-300x200.jpg --output wp.ddev.site-test.png

# Get WP export file ready, remove dirty data if necessary, as they are currently hard blockers, like the ones below
<wp:meta_value><![CDATA[a:0:{}]]></wp:meta_value>
<wp:meta_value><![CDATA[raw]]></wp:meta_value>
<wp:meta_value><![CDATA[a:1:{s:17:"svg-not-supported";a:1:{i:0;s:78:"SVG images are not ...";}}]]></wp:meta_value>

2. TEST

# restore DDEV snapshot
ddev snapshot restore migrate_ready

# install WordPress migrate modules fresh, since things might have changed
drush install wordpress_migrate wordpress_migrate_ui -y

# create import
drush wordpress-migrate-generate /var/www/html/my_wp_export_03_15.xml \
--group-id=my_wp \
--prefix=my_ \
--base-url=https://wp.ddev.site/ \
--category-vocabulary=tags \
--tag-vocabulary=tags \
--image-field=field_image \
--page-type=article \
--page-body-field=body \
--page-text-format=full_html \
--post-type=article \
--post-body-field=body \
--post-text-format=full_html

# log in, open Migration page and import
xdg-open $(drush uli admin/structure/migrate/manage/my_wp/migrations)
drush migrate:status

# run these migrations to complete all tasks (until drush migrate:import --all works)
drush migrate:import --all
drush migrate:import my_wordpress_attachments
drush migrate:import my_wordpress_content_post
drush migrate:import --all
hongpong’s picture

Thanks this is very helpful . I am going to post the larger validator and logging updates, onto. https://git.drupalcode.org/project/wordpress_migrate/-/merge_requests/45 .. hopefully this give us the good logging to crack these other things.

I also found that the drush migrate group import command would not work - that is unclear to me what the issue is.

ressa’s picture

That sounds fantastic, please let me know if I can help test the new validator and logger feature, and what I should look out for.

About using --group with Drush I believe I have tried to use it previously for standard migrations, but never had much luck with getting it work ... But after experimenting with the --tag parameter, I managed to be able to run clusters of migrations with drush migrate:import --tag=content_all.

I looked around, and just now found this:

Using Drush and Migrate Manifest

The contributed Migrate Manifest module allows you to run a group of migrations in a reproducible manner and in the correct order based on the migration dependencies. Usage examples are provided in the Upgrading to Drupal 8 handbook.

From https://www.drupal.org/docs/drupal-apis/migrate-api/executing-migrations...

So perhaps --group only works if https://www.drupal.org/project/migrate_manifest is installed?

hongpong’s picture

migrate_manifest doesn't seem to be supported anymore, it looks like. Super pesky. Anyways I have gotten the logging working on drush (along with the critical fixes for command line arguments) so I will add that to 8.x-3.x . Still doesn't resolve this issue however.

  • hongpong committed 37ace5f4 on 8.x-3.x
    Add missing body_field_type and body_field CLI input fields to drush...
ressa’s picture

Thanks for the hard work here!

Some good related news: It seems like DDEV is now able to connect to another DDEV instance directly, and not as previously where using the internal Docker hostname was required. This is a great improvement, since the internal Docker hostname is a bit cryptic, and can be hard to find:

Previously, you had to use an internal Docker hostname http://ddev-wp-web as URL to connect a Drupal DDEV with a WordPress DDEV instance.

I updated the documentation page, and the instructions are now a little easier to complete: https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib...

starlight-sparkle’s picture

Hi all, I was looking for similar error messages in custom migrations and happened to stumble upon this issue thread.
I am not using wordpress_migrate, but rather my own hand-written migration ymls, and observed that it seems drush mim --tag=[tag] (or any other command that imports multiple migrations) simply never tries to sort by dependency graph at all and always just runs migrations in alphabetical order.

What I discovered was that when migrate_run was merged into Drush Core, the implementation of migrate:import command that was merged simply did that by design.
Code excerpt:

foreach ($list as $migrations) {
  array_walk($migrations, [static::class, 'executeMigration'], $userData);
}

It does not provide the same dependency checking provided by the migrate:import command from migrate_tools, which is what most Drupal 8 era devs will be used to.
Code excerpt:

    // Create a dependency graph. The migrations in the given list may have
    // dependencies not in the list, so we need to add those to the list as we
    // go.
    $dependency_graph = [];
    while (!empty($migrations_to_process)) {
      // Get the next migration in the list.
      $migration = reset($migrations_to_process);
      unset($migrations_to_process[$migration->id()]);

      // Add its dependencies to the graph and to the list.
      $migration_dependencies = $migration->getMigrationDependencies(TRUE);

      $dependency_graph[$migration->id()]['edges'] = [];
      if (isset($migration_dependencies['required'])) {
        foreach ($migration_dependencies['required'] as $dependency) {
          $dependency_graph[$migration->id()]['edges'][$dependency] = $dependency;

          $migrations_to_process[$dependency] = $manager->createInstance($dependency);
        }
      }
    }

The effect is that depending on the combination of module versions and drush versions you have installed, you could be running the command from Drush Core, or the command from Migrate Tools, and they behave differently.

hongpong’s picture

thank you starlight-sparkle. it reminds me i saw just recently in the #migration slack something similar, maybe the same issue. https://drupal.slack.com/archives/C226VLXBP/p1773935360368689 . also this may be related: #3572002: migration_dependencies.optional ignored since 6.1.3 and #2969227: 'migrate status MIGRATION' loads every migration. could see if migrate_tools 6.1.2 does not have the issue? It does seem like an upstream regression because I am fairly sure I remember this module executing things with actual reference to the dependencies. benjifisher noted "Migrate Tools is relevant, since it overrides some of the default Drush commands."

if someone has the time to check if the dev branch of migrate_tools repairs this issue that would answer the question. there is a purported fix already committed but not on tag release. ( when a tagged release comes out I could tick the requirements to match it because of this, if it is indeed the case)

ressa’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

Thank you @starlight-sparkle and @hongpong, great digging and sharing of information and links to related issues.

I tried the dev-version of Migrate Tools and have good news: The requirements are used, so drush migrate:import --all completes in the first try, and I am happy to set this issue to "Closed (cannot reproduce)" :)

$ drush migrate:status
 ---------------------- ----------------- ------- ---------- -------------
  Group                  Migration ID      Total   Imported   Unprocessed 
 ---------------------- ----------------- ------- ---------- -------------
  Import WordP (my_wp)   my_authors        12      0          12          
  Import WordP (my_wp)   my_attachments    38      0          38          
  Import WordP (my_wp)   my_categories     126     0          126         
  Import WordP (my_wp)   my_tags           0       0          0           
  Import WordP (my_wp)   my_content_post   13      0          13          
  Import WordP (my_wp)   my_comment_post   19      0          19          
  Import WordP (my_wp)   my_content_page   2       0          2           
  Import WordP (my_wp)   my_comment_page   19      0          19          
 ---------------------- ----------------- ------- ---------- -------------

$ drush migrate:import --all
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_attachments'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_authors'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_categories'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_comment'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_content'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'wordpress_tags'
 [notice] Processed 12 items (11 created, 0 updated, 0 failed, 1 ignored) - done with 'my_wordpress_authors'
 [notice] Processed 38 items (38 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_attachments'
 [notice] Processed 126 items (126 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_categories'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_tags'
 [notice] Processed 13 items (13 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_content_post'
 [notice] Processed 20 items (19 created, 1 updated, 0 failed, 0 ignored) - done with 'my_wordpress_comment_post'
 [notice] Processed 2 items (2 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_content_page'
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'my_wordpress_comment_page'


$ drush migrate:status
 ------------- -------- -----------------  ------- ---------- -------------
  Group                  Migration ID       Total   Imported   Unprocessed 
 ------------- -------- -----------------  ------- ---------- -------------
  Import WordP (my_wp)   my_authors         12      11         0           
  Import WordP (my_wp)   my_attachments     38      39         -1          
  Import WordP (my_wp)   my_categories      126     126        0           
  Import WordP (my_wp)   my_tags            0       0          0           
  Import WordP (my_wp)   my_content_post    13      13         0           
  Import WordP (my_wp)   my_comment_post    19      20         -1          
  Import WordP (my_wp)   my_content_page    2       2          0           
  Import WordP (my_wp)   my_comment_page    19      0          19          
 ------------- -------- -----------------  ------- ---------- -------------

PS. A few Page comments are unprocessed, but that can be handled in #3580225: Add support for setting comment destination.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

ressa’s picture

Issue summary: View changes
starlight-sparkle’s picture

One question: is there a reason this module's info yml doesn't enforce the enablement of migrate tools, even though it's required in composer.json?

ressa’s picture

Just adding related issue.

ressa’s picture

ressa’s picture

Title: drush migrate:import --all fails » drush migrate:import --all fails due to Migrate Tools regression

... and updating title :)

ressa’s picture

Issue summary: View changes

That's an interesting question @starlight-sparkle. Only WordPress Migrate UI seems to require Migrate Tools, and running a Drush migration without installing neither WordPress Migrate UI, nor Migrate Tools works well:

$ drush migrate:status
 --------------------------- ------- ---------- -------------
  Migration ID                Total   Imported   Unprocessed 
 --------------------------- ------- ---------- -------------
  my_wordpress_attachments    38      0          38          
  my_wordpress_authors        12      0          12          
  my_wordpress_categories     126     0          126         
  my_wordpress_comment_page   19      0          19          
  my_wordpress_comment_post   19      0          19          
  my_wordpress_content_page   2       0          2           
  my_wordpress_content_post   13      0          13          
  my_wordpress_tags           0       0          0           
  wordpress_attachments       0       0          0           
  wordpress_authors           0       0          0           
  wordpress_categories        0       0          0           
  wordpress_comment           0       0          0           
  wordpress_content           0       0          0           
  wordpress_tags              0       0          0           
 --------------------------- ------- ---------- -------------
$ drush migrate:import --all
    0 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) in 0.1 seconds (0/min) - done with 'wordpress_attachments'
    0 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) in 0 seconds (0/min) - done with 'wordpress_authors'
    0 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) in 0 seconds (0/min) - done with 'wordpress_categories'
    0 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) in 0 seconds (0/min) - done with 'wordpress_comment'
    0 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) in 0 seconds (0/min) - done with 'wordpress_content'
    0 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) in 0 seconds (0/min) - done with 'wordpress_tags'
 12/12 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
 [notice] Processed 12 items (11 created, 0 updated, 0 failed, 1 ignored) in 0.2 seconds (3726.9/min) - done with 'my_wordpress_authors'
 38/38 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
 [notice] Processed 38 items (38 created, 0 updated, 0 failed, 0 ignored) in 0.4 seconds (6107.2/min) - done with 'my_wordpress_attachments'
 126/126 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
 [notice] Processed 126 items (126 created, 0 updated, 0 failed, 0 ignored) in 0.8 seconds (9097.4/min) - done with 'my_wordpress_categories'
    0 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) in 0 seconds (0/min) - done with 'my_wordpress_tags'
 13/13 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
 [notice] Processed 13 items (13 created, 0 updated, 0 failed, 0 ignored) in 0.5 seconds (1501.5/min) - done with 'my_wordpress_content_post'
 19/19 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
 [notice] Processed 20 items (19 created, 1 updated, 0 failed, 0 ignored) in 0.4 seconds (2708.4/min) - done with 'my_wordpress_comment_post'
 2/2 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
 [notice] Processed 2 items (2 created, 0 updated, 0 failed, 0 ignored) in 0.1 seconds (1064.5/min) - done with 'my_wordpress_content_page'
 19/19 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
 [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) in 0.2 seconds (0/min) - done with 'my_wordpress_comment_page'

$ drush migrate:status
 --------------------------- ------- ------------- -------------
  Migration ID                Total   Imported      Unprocessed 
 --------------------------- ------- ------------- -------------
  my_wordpress_attachments    38      39 (102.6%)   -1          
  my_wordpress_authors        12      11 (91.7%)    0           
  my_wordpress_categories     126     126 (100%)    0           
  my_wordpress_comment_page   19      0             19          
  my_wordpress_comment_post   19      20 (105.3%)   -1          
  my_wordpress_content_page   2       2 (100%)      0           
  my_wordpress_content_post   13      13 (100%)     0           
  my_wordpress_tags           0       0             0           
  wordpress_attachments       0       0             0           
  wordpress_authors           0       0             0           
  wordpress_categories        0       0             0           
  wordpress_comment           0       0             0           
  wordpress_content           0       0             0           
  wordpress_tags              0       0             0           
 --------------------------- ------- ------------- -------------
ressa’s picture

Issue summary: View changes

Adding correct solution issue in issue summary here.

ressa’s picture

Issue summary: View changes
ressa’s picture

Issue summary: View changes
ressa’s picture

Issue summary: View changes

Adding tip that Migrate Tools 6.1.4 has been released.