Site Speed WTF?!

Weekly Email

Please wait…


You have subscribed! A verification email will be sent to you.


SpeedGuard tracks Core Web Vitals from your WordPress. Check it out.

Delete all comments in WordPress (as well as posts, custom posts and revisions)

Delete all comments in WordPress (as well as posts, custom posts and revisions)

These snippets will bulk delete all posts/custom posts/comments/revisions from WordPress blog totally, removing them from database. Proceed with caution.

Delete all posts:

https://gist.github.com/sabrina-zeidan/449c10b84b2fde7a0d0d08cd5592d297

Delete all custom posts:

https://gist.github.com/sabrina-zeidan/e7cae401a1cd88d902f28d28431fbd92

*mind to change “book” to the custom post type name you want to bulk delete

Delete all post revisions:

https://gist.github.com/sabrina-zeidan/9172bb053945bf2b4e9b9a9200d3d9cc

Delete all spam comments:

https://gist.github.com/sabrina-zeidan/5d8220f1d4c82eef9b233576deb74739

Delete all comments:

https://gist.github.com/sabrina-zeidan/907b576d47589901c5a1a9549a1dcb2a

Read how to delete tags and terms here and images clean up is here.

Leave a Reply

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