Safely Bulk Deleting Images of Removed WooCommerce Products
-
Can someone advise me on how to bulk delete images of removed products from the media library? I tried using Media Cleaner, but it ended up deleting images of products that are still listed, causing a major issue. Upon investigating the cause, it appears that some images in WooCommerce, despite being used and displayed, have their file status showing as unattached. When using Media Cleaner, these images get deleted.
Until now, I haven’t had a method to delete large numbers of these images, so I’ve been leaving them as is. However, due to my business model of dealing with a large volume of used products that are typically sold only once, I need to regularly remove sold product listings. The problem is that WooCommerce doesn’t automatically delete the image files from the media library when a product is removed. As a result, the size of images from deleted products has become enormous, and I’m approaching the limit of my disk space.
Is there a safe way to bulk delete these unused images without affecting the images of current products?
- You must be logged in to reply to this topic.