0

I have a staging site and need to give an access to developers. So, I have to delete all customers just in case. I have below command. But I feel there should be better command. Can you advise?

wp user delete $(wp user list --role=customer --field=ID --number=200000) --reassign=1

PS: I delete orders with below command.

wp post list --field=ID --post_type=shop_order --posts_per_page=2000 | xargs wp post delete --force

0

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.