Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI command to migrate legacy WP users #118

Merged
merged 8 commits into from
Jan 19, 2023
Merged

CLI command to migrate legacy WP users #118

merged 8 commits into from
Jan 19, 2023

Conversation

mattheu
Copy link
Member

@mattheu mattheu commented Jan 16, 2023

If you enable Authorship on an existing site, author archives break because authorship authors are not set.

This adds a CLI command to run through all posts that have no authorship author set, and sets adds the post_author to authorship.

Optionally, you can pass --override-authorship to remove all authorship users and replace with WordPress authors.

Fixes #78.

@mattheu mattheu marked this pull request as ready for review January 17, 2023 08:40
@svandragt
Copy link

svandragt commented Jan 17, 2023

I don't think the optional parameter is clear at all, but it's a great option to have. How about --set-wordpress-authors to be descriptive of what the end result is?

Copy link
Member

@johnbillion johnbillion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, just needs:

  1. A fix for the dry-run flag
  2. Docs added to the readme (probably above the "PublishPress Authors Migration" section)

inc/cli/class-migrate-command.php Outdated Show resolved Hide resolved
@mattheu
Copy link
Member Author

mattheu commented Jan 17, 2023

I don't think the optional parameter is clear at all, but it's a great option to have. How about --set-wordpress-authors to be descriptive of what the end result is?

@svandragt I copied this command from the Publish Press Authors migration command, which does the exact same thing. So for consistency, I'd like to keep it the same.

@mattheu
Copy link
Member Author

mattheu commented Jan 17, 2023

Feedback addressed @johnbillion

@mattheu mattheu merged commit d3eaf57 into develop Jan 19, 2023
@mattheu mattheu deleted the wp-user-migrate branch January 19, 2023 16:02
@mattheu mattheu mentioned this pull request Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migration process for vanilla WordPress
3 participants