Categories
WooCommerce WordPress WP-CLI

How to Bulk Delete all WooCommerce Customer Accounts

The following WP-CLI command is a really easy way to delete all existing WooCommerce customer accounts on a WordPress website:

wp user list --field=ID --role=customer | xargs wp user delete --yes

And the best part: all of the information from the customers’ existing orders remained in-tact as well!

By James Collins

A WordPress web developer and ameteur photographer from Perth, Australia. I've been using WordPress since version 2.2.    
More about me →     Follow @james_collins_ on Twitter →

6 replies on “How to Bulk Delete all WooCommerce Customer Accounts”

Leave a Reply

Your email address will not be published. Required fields are marked *