feat(custom-status): add status migration tool and WP-CLI commands #859
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds tools to migrate posts between statuses, addressing the long-standing issue of posts becoming inaccessible when Edit Flow is deactivated while posts have custom statuses.
wp edit-flow custom-status list- list all custom statuses with post countswp edit-flow custom-status migrate --from=pitch --to=draft- migrate posts between statuseswp edit-flow custom-status counts- show post counts per status for a post typeBackground
When Edit Flow is deactivated, posts with custom statuses (like "pitch", "assigned") remain in the database with those status values, but WordPress no longer recognizes them, making the posts inaccessible.
This adds "service-oriented" tools that allow users to migrate posts to core statuses before deactivating, or to re-enable Edit Flow, migrate posts, and then deactivate again.

Test plan
listcommand shows all statusesmigratecommand migrates postsmigrate --dry-runpreviews without changescountscommand shows post countsCloses #230
🤖 Generated with Claude Code