i have been trying to use WP CLI to export custom post type 'product' from custom taxonomy 'product_brand'. however, my command is exporting a random list of products, from other brands. it also is not exporting any variations.

here is my command:

wp post list --post_type=product --fields=ID,post_title --tax_query='[{"taxonomy":"product_brand","field":"slug","terms":"dassy"}]' --format=csv --include=children > dassy_products.csv
  • technically the answer to your question is in the question, yes you can export CPT's, you might want to rephrase it though. I also see variations which heavily implies WooCommerce, you can't ask for help with 3rd party plugins here, unless your question can be answered with generic WP knowledge it's offtopic
    – Tom J Nowell
    Mar 31 at 9:30
  • ps: have you tried --product_brand=dassy? WooCommerce variations likely needs a question asked in a WooCommerce community, WooCommerce probably has its own WP CLI subcommands too
    – Tom J Nowell
    Mar 31 at 9:31
  • thank you will ask woocommerce. Mar 31 at 10:37


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.