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

wp export to allow a path to a static flat file containing post IDs #71

Open
lukecav opened this issue Aug 25, 2020 · 3 comments
Open

Comments

@lukecav
Copy link

lukecav commented Aug 25, 2020

If you needed to be able to export a large number of posts by ID it would be very useful to be able to define a path containing a CSV or JSON file which contained the post IDs when running the wp export command.

Example
wp export --post__in_dir=/tmp/post-ids.csv

@schlessera
Copy link
Member

How would WP-CLI know what column or filed to use in the CSV/JSON?

Also, I know that this has technical limits depending on the shell you're running it in, but you can already do something similar with:

wp export --post__in=$(cat list-of-ids.txt)

@lukecav
Copy link
Author

lukecav commented Aug 26, 2020

@schlessera

The first column in the CSV would contain the list of the post IDs.

@jamesfacts
Copy link

This would be super useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants