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: 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.