Unlock Hidden Powers: Transform Your WordPress Workflow with WP-CLI Today!

Unlock Hidden Powers: Transform Your WordPress Workflow with WP-CLI Today!
wp comment list

However, this doesn’t always include spam comments in the list. To see spam comments, use this command:

wp comment list --status=spam

Then, to delete the spam comments, use the wp comment delete command with the wp comment list command:

wp comment delete $(wp comment list --status=spam --format=ids)

The above are just a few examples of how you can use WP-CLI to interact with your WordPress site outside of the WP Admin interface. 

Hopefully, this has inspired you to start interacting with WordPress from the command line. 

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38