• Resolved corus9

    (@corus9)


    i’ve 30k active products and 1k in trash, i want to delete all the products including trash.

    for active products i’m trying this command :

    wp post delete $(wp post list --post_type='product' --format=ids) --force --allow-root

    but getting this in return :

    usage: wp post delete <id>... [--force] [--defer-term-counting]

    same for trash products : wp post delete $(wp post list --post_status=trash --format=ids) --allow-root

    getting same error : usage: wp post delete <id>... [--force] [--defer-term-counting]

    can anyone help me to figure out this issue

    edit :

    wp wc product delete <id> --user=admin --allow-root

    while above command works fine but i want to delete products in bulk and this deletes single product only

    • This topic was modified 5 years, 3 months ago by corus9.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘not able delete all products using cli’ is closed to new replies.