• I have a WordPress blog with many posts, about 530 or so. However, I see in my media gallery that I have over 645 images. I tried going through and deleting images that are unattached to posts and pages. I don’t need, but I still have more images than posts, and I want the space freed of unwanted pics. Does anyone know of a plugin that I can use to delete images that are unattached to my existing posts? Something that can scour the blog gallery and get rid of images that are not in use? Please assist as soon as possible.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Hi there @vectorspiral ,

    There are plugins designed exactly for this, but there’s an important thing before you go through with a bulk delete.

    Important note first: In WordPress, an image shows as “unattached” simply because it wasn’t uploaded while editing a specific post it doesn’t necessarily mean the image is unused. Images used in widgets, your site logo, theme Customizer settings, or page builders (Elementor, Divi, etc.) can still appear as “unattached” even though they’re actively displayed on your site. So don’t rely on “unattached” alone as your deletion criteria, you want a plugin that actually scans where images are used, not just their attachment status.

    Steps:

    1. Back up your site first (files + database) before running any bulk deletion tool. This step is not optional — deleted media files cannot be recovered otherwise.
    2. Install and activate the Media Cleaner plugin from the official WordPress.org repository:
      https://wordpress.org/plugins/media-cleaner/
      It scans your posts, pages, and common page builders/theme settings for real usage (not just the “attached” flag), and moves anything it finds unused into an internal trash first so you can review before permanently deleting.
    3. Run a scan and carefully review the results list. Pay close attention to anything flagged that you recognize as a logo, favicon, or widget image and confirm it’s genuinely unused before deleting.
    4. Once you’re confident, delete the reviewed items from the plugin’s internal trash.
    5. If you have a large number of files (600+), consider running the scan during low-traffic hours, since scanning that much content can take some time on shared hosting.

    Alternative option: If Media Cleaner doesn’t fit your setup, “Media Hygiene” is another actively maintained option on WordPress.org with deep folder scanning and bulk delete, worth comparing: https://wordpress.org/plugins/media-hygiene/

    Let me know how the scan results go, happy to help!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.