How to Bulk Remove WordPress Blog Post Thumbnails
Do you want to remove all your featured images in WordPress? When redesigning your site or changing the post thumbnail dimensions, you may need to remove multiple featured images in one step instead of tediously deleting them one by one. In this tutorial, we will share how to bulk remove WordPress blog post thumbnails.
Remove WordPress Blog Post Thumbnails in One Go
WordPress posts and pages have the option to display featured image, depending on the theme you’re using. This featured image, also called a post thumbnail, appears at the top of each web page. If you remove your thumbnails one by one manually from posts and pages, then it will take a lot of time and effort.
It is recommended to use a database query that helps remove post thumbnails all at once. You can do that by adding a bit of code to your theme’s functions.php file.
If you’re not sure how to do this, see this beginner’s guide to pasting snippets from the web into WordPress.
Simply add this script in your theme’s functions.php file:
global $wpdb; $wpdb->query( " DELETE FROM $wpdb->postmeta WHERE meta_key = '_thumbnail_id' " );
Make sure to click on the Save button. All your WordPress featured images will be removed. These images are still available in your WordPress media library.
If you leave this code in theme’s function.php file, it will disable thumbnail generation on your site permanently. Simply remove the code and click on the Save button again, so when you upload new featured images, they will appear in your WordPress site.
That’s all. We hope this simple tutorial has helped you to learn how to bulk remove WordPress blog post thumbnails. You may also want to check out our guide on how to fix the image desaturation issue in WordPress with Adobe Photoshop and read about these highly effective lead magnet ideas to grow your email list, so you get more traffic on your new site.