You may need to bulk resize images because you decided to serve scaled images and speed up your site at last. Or your theme layout has been changed and you need images resized accordingly.
Before you start:
Be careful and make a database backup before you start.All these functions can be fired by any hook, obviously. If you leave wp_head that I used in examples it’s fine.
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:
Delete all custom posts:
*mind to change “book” to the custom post type name you want to bulk delete
Delete all post revisions: