I am interested in
Deleting Woocommerce Products without a Featured Image
August 13, 2019
August 13, 2019

Deleting Woocommerce products without featured images

Sometimes there is a perfect ecommerce store and there is only one thing wrong about it – products without a featured image. It may happen to any store – maybe the products are imported via csv file and since there could be tens of thousands of products, it is hard to check one by one. One of the best solutions then is to simply delete all products that do not have the featured image. Open your phpMyAdmin, go to SQL and iput this short code:

DELETE FROM wp_posts WHERE ID NOT IN (select post_id from wp_postmeta WHERE meta_key="_thumbnail_id") AND post_type = 'product';
Sign up to our newsletter