Soliloquy Blog

WordPress slider tips, Tutorials and Resources.
Remove WordPress Blog Post Thumbnails

How to Bulk Remove WordPress Blog Post Thumbnails

by Waseem Abbas on June 26, 2017
Share This Post

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.

If you like this tutorial, then please follow us on Facebook and Twitter for more free WordPress guides and resources.

Share This Post
Waseem Abbas is a content writer for SoliloquyWP and Envira Gallery.

Leave a Reply

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

[i]
[i]