Title: MGCora Unused Media Cleaner
Author: Madan G.C.
Published: <strong>14 July 2026</strong>
Last modified: 12 October 2026

---

Search plugins

![](https://ps.w.org/mgcora-unused-media-finder/assets/banner-772x250.png?rev=3641956)

![](https://ps.w.org/mgcora-unused-media-finder/assets/icon-256x256.png?rev=3641876)

# MGCora Unused Media Cleaner

 By [Madan G.C.](https://profiles.wordpress.org/madan1gc/)

[Download](https://downloads.wordpress.org/plugin/mgcora-unused-media-finder.1.0.7.zip)

 * [Details](https://en-gb.wordpress.org/plugins/mgcora-unused-media-finder/#description)
 * [Reviews](https://en-gb.wordpress.org/plugins/mgcora-unused-media-finder/#reviews)
 *  [Installation](https://en-gb.wordpress.org/plugins/mgcora-unused-media-finder/#installation)
 * [Development](https://en-gb.wordpress.org/plugins/mgcora-unused-media-finder/#developers)

 [Support](https://wordpress.org/support/plugin/mgcora-unused-media-finder/)

## Description

Deleting unused media is easy. Deleting it without breaking your site is the hard
part, and that is what this plugin is built for.

Most cleanup tools call a file unused if they cannot find it in your post content.
That misses media stored by page builders, custom fields, product galleries, taxonomy
thumbnails, widgets, and theme settings, which is how cleanup tools end up deleting
images that were still on your pages.

MGCora Unused Media Cleaner checks all of those places, and then checks again at
the moment you delete, so a file that is still referenced anywhere is not removed.
Nothing is deleted without your confirmation, removals are backed up by default,
and anything you remove can be restored.

It covers your entire media library, not just images: video, audio, PDFs, and other
documents are classified the same way. Works on personal blogs, business sites, 
WooCommerce stores, and agency portfolios alike.

#### Features

 * Scan your entire WordPress media library
 * Detect used and unused media of every type (images, video, audio, PDFs, and documents)
 * Identify media used in posts, pages, and custom post types
 * Detect featured images
 * Scan media references stored in post meta (incl. page builders, ACF, WooCommerce
   galleries, and Yoast/RankMath SEO images)
 * Detect images used as taxonomy term thumbnails or in term descriptions
 * Batch scanning for large media libraries
 * Optional scheduled scans (daily/weekly) via WP-Cron, with an emailed summary
 * Export scan results to CSV
 * One-click cleanup: delete every currently-unused file in one confirm, without
   manually filtering and selecting them first
 * Fast and lightweight performance
 * Safe deletion workflow with restore-from-trash
 * Clean and easy-to-use interface
 * Built with WordPress coding standards

#### Why Use MGCora Unused Media Cleaner?

 * Free up server storage
 * Keep your media library organized
 * Reduce unnecessary backups
 * Improve website maintenance
 * Remove media with confidence
 * Avoid deleting files that are still in use

#### Safe by Design

MGCora Unused Media Cleaner never assumes a file is safe to delete without checking
where it is being used. Every scan is designed to minimize false positives by verifying
media references before a file is marked as unused. You stay in complete control
and can review the results before deleting anything.

#### Perfect For

 * Bloggers
 * Business websites
 * WooCommerce stores
 * Agencies
 * Developers
 * Content creators
 * Membership websites
 * Portfolio websites

#### Source Code

The admin interface (`build/index.js`) is a compiled JavaScript bundle built with`@
wordpress/scripts`. Its human-readable source ships with the plugin in the `src/`
directory, and `assets/css/admin.css` is compiled from `assets/css/admin.scss`. 
To rebuild both from source, run `npm install` followed by `npm run build` (see `
package.json` for the exact build scripts).

#### Privacy

MGCora Unused Media Cleaner runs entirely on your own server. It does not make any
external HTTP requests, does not collect or transmit any data, and does not “phone
home.” All scan data is stored in your site’s own database and is removed when you
uninstall the plugin.

#### Roadmap

Future releases will add support for:

 * Additional page builders
 * Storage reports
 * Advanced usage reports

## Screenshots

[⌊Dashboard overview with media usage stats, reclaimable storage, and one-click 
cleanup.⌉⌊Dashboard overview with media usage stats, reclaimable storage, and one-
click cleanup.⌉[

Dashboard overview with media usage stats, reclaimable storage, and one-click cleanup.

[⌊Scanner with selectable scan depth (Quick, Standard, Deep) and live progress.⌉⌊
Scanner with selectable scan depth (Quick, Standard, Deep) and live progress.⌉[

Scanner with selectable scan depth (Quick, Standard, Deep) and live progress.

[⌊Media List showing used/unused status with filtering and bulk actions.⌉⌊Media 
List showing used/unused status with filtering and bulk actions.⌉[

Media List showing used/unused status with filtering and bulk actions.

[⌊Media detail view listing exactly where a file is used.⌉⌊Media detail view listing
exactly where a file is used.⌉[

Media detail view listing exactly where a file is used.

[⌊Trash with restore and permanent-delete actions.⌉⌊Trash with restore and permanent-
delete actions.⌉[

Trash with restore and permanent-delete actions.

[⌊Settings: Safe Mode, scan depth, post types, backup, email report, and scheduled
scan options.⌉⌊Settings: Safe Mode, scan depth, post types, backup, email report,
and scheduled scan options.⌉[

Settings: Safe Mode, scan depth, post types, backup, email report, and scheduled
scan options.

## Installation

 1. Upload the `mgcora-unused-media-finder` folder to the `/wp-content/plugins/` directory,
    or install the plugin through the Plugins screen in WordPress.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Go to Media  Unused Media to run your first scan.

## FAQ

### Is this safe to use on a production site?

Yes. Every deletion requires explicit confirmation, and deleted files are moved 
to a trash folder where they can be restored. You can also enable Safe Mode in Settings
to block all deletion, and Backup Before Delete (on by default) keeps a copy of 
each removed file.

### How does the scan work?

The scanner analyzes your post content, featured images, post meta (including page
builders and ACF fields), WooCommerce product galleries, SEO plugin social images(
Yoast and Rank Math), taxonomy term thumbnails and descriptions (categories, tags,
and custom taxonomies), widgets, menus, and theme customizations to build a complete
picture of which media files are in use. Files not found in any of these sources
are flagged as unused.

Whatever the scan concluded, the same checks run again against the live database
at the moment you delete a file. So even if a scan is old, or something started 
using a file after the scan finished, that file is not removed.

### Will it work with my page builder?

Page builders such as Elementor, WPBakery, and Beaver Builder store their media 
references in post meta, which the scanner reads, matching both attachment IDs and
file paths (including resized versions such as image-300×200.jpg and CDN-rewritten
URLs).

If a builder or plugin stores references in an unusual way, the honest answer is
that no tool can promise to recognize every possible format. That is exactly why
this plugin re-checks at delete time, keeps a backup of every removed file, offers
restore-from-trash, and has a Safe Mode that blocks all deletion. Review the flagged
list before deleting, and start with a small batch if you are unsure.

### Can I export the scan results?

Yes. The Media List screen has an Export CSV button that exports the current scan,
honoring whichever status filter you have applied, including the file name, status,
size, type, and where each file was found in use.

### Can scans run automatically on a schedule?

Yes. In Settings you can set scans to run daily or weekly via WP-Cron, in addition
to running them manually. Pair it with the email report to get a summary after each
run.

### I turned on email reports but no email arrives

That is almost always the site’s mail configuration rather than the plugin. WordPress
sends mail through PHP’s built-in mail() function by default, which many hosts do
not deliver reliably.

Use the Send Test Email button in Settings to check. It reports the actual result,
and Settings also shows whether the last report was sent or failed, along with the
error. If sending fails, install an SMTP plugin to route mail through a real mail
service.

### Does it work with files other than images?

Yes. MGCora Unused Media Cleaner scans your entire media library (images, video,
audio, PDFs, and other documents) and classifies each file as used or unused the
same way.

### Will it delete files automatically?

No. MGCora Unused Media Cleaner only flags unused media. You review the results 
and choose what to remove, and removed files can be restored from the trash.

### What does “Clean Up All Unused Media” do?

It is a shortcut for the same manual process (filter Media List to Unused, select
all, bulk delete), not a different or less careful one. Each file is still re-checked
for use immediately before deletion, still backed up (if enabled), and still blocked
entirely if Safe Mode is on. You see the file count and total size and confirm once
before anything happens.

## Reviews

There are no reviews for this plugin.

## Contributors and Developers

“MGCora Unused Media Cleaner” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ Madan G.C. ](https://profiles.wordpress.org/madan1gc/)
 *   [ Bishal Shrestha ](https://profiles.wordpress.org/rainynewt/)

[Translate “MGCora Unused Media Cleaner” into your language.](https://translate.wordpress.org/projects/wp-plugins/mgcora-unused-media-finder)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/mgcora-unused-media-finder/),
check out the [SVN repository](https://plugins.svn.wordpress.org/mgcora-unused-media-finder/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/mgcora-unused-media-finder/)
by [RSS](https://plugins.trac.wordpress.org/log/mgcora-unused-media-finder/?limit=100&mode=stop_on_copy&format=rss).

## Change Log

#### 1.0.7

 * Fix: emptying the Trash (or permanently deleting one item) could delete a newer,
   in-use file that had since been uploaded with the same name to the same folder.
   Only the plugin’s own backup copy is removed now.
 * Fix: restoring a file whose original path is now taken by a newer upload no longer
   takes over that other file; it is restored beside it under a unique name.
 * Fix: if the backup copy can’t be written (full disk, permissions), the file is
   no longer deleted.
 * Fix: for large images, the full-size original is now backed up and restored, 
   not just the “-scaled” copy.
 * Fix: more places where media is used are now detected, so these files are no 
   longer wrongly listed as unused or deletable: menu links to a file (e.g. a PDF),
   page-builder shortcode images (WPBakery, Avada and similar), Elementor images
   stored only by URL, ACF Options Page fields, the WooCommerce placeholder image
   and other plugin settings, user avatars, and files shared by several attachments(
   WPML/Polylang media translations).
 * Fix: Standard and Deep scans no longer mark a file as used just because its ID
   number appears somewhere in a post’s text, so unused counts are accurate.
 * Fix: a scan no longer freezes on “Scanning…” after switching to another tab and
   back; it continues where it left off.
 * Fix: cancelling a scan no longer shows “Scan Complete!”, and a failed batch now
   stops the scan with an error instead of polling forever.
 * Fix: a scheduled scan and a manual scan no longer interfere with each other, 
   and scheduled scans resume after a manual scan was abandoned mid-way.
 * Fix: Safe Mode now also blocks single-file deletes, and the recorded scan duration
   covers the whole scan.
 * Fix: the Trash screen now lists every trashed file (previously only the first
   200).
 * Fix: delete, restore and settings errors are now shown instead of failing silently,
   and dialogs no longer get stuck on their spinner after a network error.
 * Fix: deleting every row on the last Media List page no longer shows an empty “
   no media” page.
 * Accessibility: keyboard focus no longer jumps back to an earlier checkbox while
   selecting rows, and the Settings toggles have accessible names.
 * Removed the misleading “Select all N items” button, which only acted on the current
   page. Use “Clean Up All Unused Media” on the Dashboard to delete everything unused.
 * Performance: the database table check no longer runs on every admin page load,
   only after an update.

#### 1.0.6

 * Fixed: restoring a file from the Trash was marked as restored even when the file
   couldn’t actually be recreated (e.g. no backup and the original file missing),
   silently dropping it from the Trash list with no way to retry.

#### 1.0.5

 * Change: restoring a file from the Trash (single, selected, or all) now asks for
   confirmation first, instead of restoring immediately.

#### 1.0.4

 * New: “Clean Up All Unused Media” one-click cleanup on the Dashboard. Deletes 
   every currently-unused file in one confirm, with the same safety checks as a 
   manual bulk delete (fresh in-use re-check, backup, Safe Mode still blocks it).

#### 1.0.3

 * Tested with WordPress 7.1.
 * Fix: changing the scheduled scan frequency (for example daily to weekly) did 
   not take effect — the original schedule kept running while Settings showed the
   new one.
 * Fix: pending scheduled scan batches were not cleared when the plugin was deactivated
   or uninstalled, leaving stale WP-Cron entries behind.
 * Docs: corrected the Installation steps, which still pointed at the old “MGCora”
   menu name instead of Media  Unused Media.
 * Docs: the FAQ now covers page builder support, CSV export, scheduled scans, and
   what to do when report emails do not arrive.

#### 1.0.2

 * Fix: media used only in a WooCommerce product image gallery, an ACF Gallery/Relationship-
   style field, a Yoast SEO social image field, or a RankMath social image field
   could be wrongly marked as unused. The safety net used both during scanning and
   at delete time now checks all of these.
 * New: “Post Types to Scan” and “Send Email Report After Scan” settings now actually
   take effect (previously saved but unused).
 * New: export the current scan results (used or unused) to a CSV file from the 
   Media List screen.
 * New: optional scheduled scans (daily/weekly) via WP-Cron, in addition to running
   scans manually.
 * The Media submenu item is now labeled “Unused Media” instead of “MGCora”.

#### 1.0.1

 * Fix: images used as taxonomy term thumbnails (e.g. category/destination/product-
   category images) or embedded in term descriptions were incorrectly flagged as
   unused. The scanner and the delete-time safety check now also look at term meta
   and term descriptions across all taxonomies.

#### 1.0.0

 * Initial release.

## Meta

 *  Version **1.0.7**
 *  Last updated **1 day ago**
 *  Active installations **10+**
 *  WordPress version ** 6.2 or higher **
 *  Tested up to **7.1.3**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/mgcora-unused-media-finder/)
 * Tags
 * [media cleaner](https://en-gb.wordpress.org/plugins/tags/media-cleaner/)[media cleanup](https://en-gb.wordpress.org/plugins/tags/media-cleanup/)
   [media library](https://en-gb.wordpress.org/plugins/tags/media-library/)[unused images](https://en-gb.wordpress.org/plugins/tags/unused-images/)
   [unused media](https://en-gb.wordpress.org/plugins/tags/unused-media/)
 *  [Advanced View](https://en-gb.wordpress.org/plugins/mgcora-unused-media-finder/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/mgcora-unused-media-finder/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/mgcora-unused-media-finder/reviews/)

## Contributors

 *   [ Madan G.C. ](https://profiles.wordpress.org/madan1gc/)
 *   [ Bishal Shrestha ](https://profiles.wordpress.org/rainynewt/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/mgcora-unused-media-finder/)