Closed (fixed)
Project:
WordPress Migrate
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
25 Nov 2024 at 03:37 UTC
Updated:
26 Mar 2026 at 15:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hongpong commentedComment #3
hongpong commentedComment #6
ressaIt looks like a task can be struck from this issue, since the old wordpress_migrate.drush.inc file was removed.
Can the patch from #2955644-12: Implement WordPress Migrate with Drush 9/10 be transferred to this issue as an MR? Or are the changes in Drush 13 too big, and it needs a total rewrite?
Also, perhaps the Issue Summary could get an update since this doesn't seem correct: "Drush 12+ is now supported"
Comment #7
ressaI spotted the Drush command
drush wordpress:migrate-generatein the patch file in the other issue, which I added to the Issue Summary ... I hope it's correct?Generating a WordPress migration entirely via Drush, instead of via the GUI, would be a really cool feature to have.
Comment #8
hongpong commentedIt is a great question, I haven't made or updated drush commands in a minute. You are probably looking in the right spot. the boilerplate in Drush definitely change over the years. for one thing it uses new style php attributes instead of annotations https://mglaman.dev/blog/writing-drush-commands-php-attributes
apparently we should use the autowire trait and not the drush.services.yml - https://www.drush.org/13.x/commands/ - https://github.com/drush-ops/drush/blob/13.x/src/Commands/AutowireTrait.php
i asked the claude bot about drush 9 vs 12 or 13 and it gave me this; https://claude.ai/share/e41bca21-d38d-498c-9818-c17b286642d4
Thanks for your interest in re addressing this, it is a very good idea.
regarding this migrateGenerate function i think it could pack its user command line settings into an $opts array or other parameters to pass, trigger one of the WordpressMigrate functions and hand over the $opts in one parameter, as opposed to configuring more elements of the migration objects in the drush function directly. (this keeping the drush lighter.)
( I was looking at doing this in #3173973: Pluggable extension, support contrib + custom WordPress, Yoast SEO for some parts of the migration process with the new pluggability extension system. ) Ideally a new drush would match the custom steps in #3173973 , potentially with new command line options. it could read a JSON to set options for extensions, or other nice features like that. (this keeping the drush extensible)
I think all of that would be ideal, but if we cannot get for instance the pluggable part, i would still be ok to commit something as better than nothing.
Comment #9
xpete commentedAttached is a new implementation of the drush command. The implementation is based on the already existing one and the drush documentation. https://www.drush.org/13.x/commands/
Comment #11
ressaThanks @xpete! The new method is to use GitLab MR's (it supports test, better reviewing, etc.) so I created a new branch based on your diff.
Comment #13
xpete commentedGreat! Thanks. Btw, no AI was used in the making of that code.
Comment #14
hongpong commentedBrilliant work and really helpful, the human expertise applied!! The only report on the MR pipeline was that
Sorry to not review this sooner, I haven't had the time to get at the volunteer work lately.
Comment #16
hongpong commentedOK I did a little more sanity checking in the migration generator and other various things. Thanks for carrying the torch on all this. I think it is fairly robust now.
Updated Readme. WordPressMigrationGenerator: catch unset base_url, duplicate migration groups, broken file_uri. Removed NEXT_MAJOR from gitlab-ci
Comment #18
ressaThank you @xpete and @hongpong, this is great news and a positive Drupal experience, which is always nice :)
We all totally understand that you are busy elsewhere @hongpong, I am just very grateful that you maintain and expand this great contrib module on a regular basis. And now, let's celebrate the release of 8.x-3.0-alpha8 today! 🎉
PS. As a positive side effect, a lot of the text under the sections "Now Drupal 10 compatible" and "Dependencies" on https://www.drupal.org/project/wordpress_migrate can be removed.
Comment #19
hongpong commentedThank you ressa :) I cleaned up the landing page a ways today. Time flies!!