Created
March 27, 2018 17:22
-
-
Save prasadnevase/71bb5bf59ff591acfba778a516a5cf1a to your computer and use it in GitHub Desktop.
Delete all products from trash using wp cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp post delete $(wp post list --post_type='product' --post_status=trash --format=ids) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is useful when there are 1000s of products in trash and your server is timing out when you try to clean your trash from WordPress backend.