Title: Sajib Media Cleanup &amp; Storage Manager
Author: Mohamed Sajib
Published: <strong>October 18, 2026</strong>
Last modified: October 18, 2026

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/sajib-media-cleanup-manager.svg)

# Sajib Media Cleanup & Storage Manager

 By [Mohamed Sajib](https://profiles.wordpress.org/sajibsays/)

[Download](https://downloads.wordpress.org/plugin/sajib-media-cleanup-manager.1.7.1.zip)

 * [Details](https://wordpress.org/plugins/sajib-media-cleanup-manager/#description)
 * [Reviews](https://wordpress.org/plugins/sajib-media-cleanup-manager/#reviews)
 *  [Installation](https://wordpress.org/plugins/sajib-media-cleanup-manager/#installation)
 * [Development](https://wordpress.org/plugins/sajib-media-cleanup-manager/#developers)

 [Support](https://wordpress.org/support/plugin/sajib-media-cleanup-manager/)

## Description

Sajib Media Cleanup & Storage Manager is a WordPress media cleaner that helps administrators
audit unused media, duplicate images, orphan files and stale generated thumbnails
before anything is permanently removed. It builds a reference index across WordPress
content and metadata, supports Elementor, ACF and WooCommerce workflows, identifies
preliminary unused and duplicate-unused media, and applies multiple verification
steps before cleanup. Because WordPress sites can include third-party or dynamically
generated references, no automated scan can guarantee that every possible media 
reference is discoverable.

Key features:

 * Reference-aware Media Library audit.
 * Exact second-pass cleanup plans before destructive operations.
 * Final live verification immediately before cleanup.
 * Safety Vault delayed-purge hold with cancellation and fresh verification before
   permanent deletion.
 * Duplicate-unused detection using file hashes.
 * Orphan-file discovery within standard WordPress date-based upload folders.
 * Media Family inspection for original, generated and optimized variants.
 * Stale derivative auditing with current-reference protection.
 * Incremental scan fingerprints, storage insights and audit history.
 * Background jobs designed to work reliably in shared-hosting environments.

Sajib Media Cleanup & Storage Manager does not treat an unattached image as automatically
unused. Candidates must pass the plugin’s verification workflow before they can 
become cleanup-ready.

#### Author

Developed by [Mohamed Sajib](https://profiles.wordpress.org/sajibsays/).

Portfolio: [sajib.dev.cv](https://sajib.dev.cv/)

### Privacy

Sajib Media Cleanup & Storage Manager performs media analysis inside the WordPress
site. The plugin does not require an external account and does not intentionally
transmit media-library contents to the author.

### Source Code

This plugin does not use compiled, minified, transpiled, or generated application
code.

 * The distributed `assets/admin.js` file is the human-readable JavaScript source
   used directly by WordPress.
 * A matching source copy is also included at `assets/src/admin.js`.
 * The distributed `assets/admin.css` file is the human-readable stylesheet used
   directly by WordPress.
 * A matching source copy is also included at `assets/src/admin.css`.
 * PHP source is included in the plugin root and `includes/`.
 * No npm, webpack, bundler, minifier, transpiler, or proprietary build tool is 
   required.
 * Rebuilding the distributed assets only requires copying source files unchanged:`
   cp assets/src/admin.js assets/admin.js` and `cp assets/src/admin.css assets/admin.
   css`.

All maintainable source required to inspect and reproduce the distributed assets
is included in this plugin package.

## Installation

 1. Install the plugin from the WordPress.org Plugin Directory, or upload the plugin
    ZIP through **Plugins > Add New > Upload Plugin**.
 2. Activate **Sajib Media Cleanup & Storage Manager**.
 3. Open **Media > Media Cleanup Manager**.
 4. Keep the recommended reference checks enabled.
 5. Run a media scan.
 6. Review the results before preparing an exact cleanup plan.
 7. Keep a current site backup before permanent cleanup operations.

## FAQ

### Does Sajib Media Cleanup & Storage Manager delete unattached images automatically?

No. Unattached does not mean unused. The plugin uses reference indexing, an exact
cleanup plan and a final live verification layer.

### Does it protect common builder and WooCommerce media references?

The scanner indexes WordPress content and metadata used by common builder and commerce
workflows, including Elementor and WooCommerce references. ACF-related metadata 
is also included in the plugin’s reference-indexing workflow.

### What is the Safety Vault delayed-purge hold?

Safety Vault is a delayed-purge hold. Verified candidates remain at their original
upload paths while deletion is pending, so cancelling the hold requires no file 
restoration. Permanent purge runs only after another live reference and path-safety
check.

### Does the plugin send site data to an external service?

No telemetry or remote scanning service is required by the plugin. Media analysis
runs inside the WordPress installation.

### Can I permanently delete files?

Yes. Permanent cleanup is available only after the verification workflow and confirmation.
Keep a recent backup before destructive operations.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Sajib Media Cleanup & Storage Manager” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ Mohamed Sajib ](https://profiles.wordpress.org/sajibsays/)

[Translate “Sajib Media Cleanup & Storage Manager” into your language.](https://translate.wordpress.org/projects/wp-plugins/sajib-media-cleanup-manager)

### Interested in development?

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

## Changelog

#### 1.7.1

 * Added plugin-row links for View details, Getting Started and Documentation.
 * Improved WordPress.org listing terminology for media-cleaner discovery.
 * Added screenshot captions for the directory listing.
 * Refined public readme and release metadata.

#### 1.7.0

 * Reworked SQL templates, identifier placeholders, filter binding and fingerprint
   commit ordering for safer scan execution.
 * Added fail-closed database checks and complete attachment metadata validation.
 * Hardened permission checks, stale-derivative validation and UTC job timestamps.
 * Added context-aware media ID extraction and isolated WordPress/MySQL tests.
 * Added WordPress/MySQL, browser, concurrency, compatibility and package-acceptance
   coverage.

#### 1.6.4

 * Excluded legacy HMG media-cleaner tables from custom reference discovery.
 * Prevents historical scanner/index data from falsely marking attachments as live
   website usage.
 * Improves cleanup accuracy on sites upgraded from earlier Media Guard/Harrington
   Media Guardian builds.

#### 1.6.3

 * Rechecked the complete WordPress.org review package and hardened self-reference
   isolation.
 * Excluded all plugin-owned operational tables from custom website-reference discovery.
 * Skip filesystem symlinks during orphan discovery before they can become candidates.
 * Replaced remaining dynamic identifier SQL with WordPress identifier placeholders
   where applicable.
 * Restored the Media Family explorer button.
 * Reformatted distributed CSS and JavaScript for clearly human-readable source 
   review.

#### 1.6.2

 * Fixed delayed-purge integrity checks so an attachment’s own inventory metadata
   is not mistaken for frontend usage.
 * Tightened safe handling of missing orphan paths during purge.
 * Removed PHP error-suppression operators from filesystem reads and image inspection.
 * Improved AJAX checkbox normalization and admin output escaping.
 * Kept all WordPress.org review fixes from 1.6.1.

#### 1.6.1

 * Renamed to place the unique Sajib identifier first and prepared the requested`
   sajib-media-cleanup-manager` slug.
 * Hardened all attachment-derived filesystem paths with uploads-directory containment
   and safe filename handling.
 * Replaced metadata-derived wildcard sibling matching with containment-checked 
   directory enumeration.
 * Replaced direct file deletion calls with WordPress core file deletion after path
   validation.
 * Added consistent unslashing and sanitization for AJAX input.
 * Clarified Safety Vault as a delayed-purge hold rather than a physical file move.
 * Added explicit human-readable source and no-build documentation for directory
   review.

#### 1.6.0

 * Renamed with a distinctive sajibsays identifier and new public slug.
 * Replaced the previous short internal prefix with the unique `sajmc_` / `SAJMC_`
   prefix.
 * Added strict uploads-directory containment checks for every attachment-derived
   filesystem path.
 * Reworked Safety Vault as delayed purge so it does not copy files into web-accessible
   storage.
 * Added human-readable JavaScript/CSS source copies and documented the no-build
   asset workflow.
 * Retained background-worker timeout recovery and bounded metadata scanning.

#### 1.5.2

 * Added automatic stale-worker recovery after Action Scheduler/host timeouts.
 * Reduced builder-reference batch size and added a six-second soft execution budget.
 * Large Elementor/metadata payloads are scanned in bounded chunks.
 * Fingerprint writes are split into smaller transactions to reduce lock/timeout
   risk.
 * Existing valid scan progress can resume safely after updating.

#### 1.5.1

 * Improved stale-derivative reference accuracy.
 * Separated self attachment metadata from authoritative frontend references.
 * Kept current page, template, option and active-code protections before derivative
   cleanup.
 * Prepared the plugin for WordPress.org distribution under GPL v2 or later.

#### 1.5.0

 * Added Safety Vault quarantine and restore workflow.
 * Added post-cleanup integrity checks.
 * Added Media Family inspection.
 * Added incremental scan delta reporting.
 * Added stale derivative audit and cleanup workflow.

## Meta

 *  Version **1.7.1**
 *  Last updated **35 minutes ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.5 or higher **
 *  Tested up to **7.1.3**
 *  PHP version ** 8.0 or higher **
 * Tags
 * [duplicate images](https://wordpress.org/plugins/tags/duplicate-images/)[media cleaner](https://wordpress.org/plugins/tags/media-cleaner/)
   [media cleanup](https://wordpress.org/plugins/tags/media-cleanup/)[orphan files](https://wordpress.org/plugins/tags/orphan-files/)
   [unused media](https://wordpress.org/plugins/tags/unused-media/)
 *  [Advanced View](https://wordpress.org/plugins/sajib-media-cleanup-manager/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/sajib-media-cleanup-manager/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/sajib-media-cleanup-manager/reviews/)

## Contributors

 *   [ Mohamed Sajib ](https://profiles.wordpress.org/sajibsays/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/sajib-media-cleanup-manager/)