Title: Shift Media Library Cleanup
Author: shiftinnovation
Published: <strong>October 12, 2026</strong>
Last modified: October 12, 2026

---

Search plugins

![](https://ps.w.org/shift-media-library-cleanup/assets/banner-772x250.png?rev=3740670)

![](https://ps.w.org/shift-media-library-cleanup/assets/icon.svg?rev=3740670)

# Shift Media Library Cleanup

 By [shiftinnovation](https://profiles.wordpress.org/shiftinnovation/)

[Download](https://downloads.wordpress.org/plugin/shift-media-library-cleanup.1.0.1.zip)

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

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

## Description

Media cleaners have one big problem: **false positives**. An image looks unused,
you delete it, and a page breaks. Shift Media Library Cleanup is built around the
opposite promise: when in doubt, a file is kept, and nothing is ever deleted before
you had the chance to undo it.

#### Why it is different

 * **It tells you why.** Every file comes with a “Why?” panel: where it is used (
   with a link to edit that content), or everywhere it was looked for.
 * **Quarantine instead of deletion.** Files are moved to a private folder and hidden
   from the Media Library. Restore them with one click, exactly as they were, for
   30 days.
 * **It watches for broken images.** If a page still requests a quarantined file,
   the plugin flags it (“requested N times since quarantine”) and shows you which
   page asked for it.
 * **It checks again right before acting.** Before anything is moved, the plugin
   re-checks content edited since the scan and searches the files’ names across 
   your database.
 * **Shared files are protected.** When several media items point to the same file,
   none of them can remove it while another one is still in use.

#### Where it looks for your media

 * Post and page content, excerpts and featured images, for every post type
 * Block editor (core blocks and media attributes of third-party blocks)
 * Classic editor: images, captions, `[gallery]` and `[playlist]` shortcodes
 * Elementor: page data, page and site settings (logo, favicon, backgrounds), dynamic
   tags
 * WPBakery Page Builder and themes built on it: element attributes, background 
   images, design options CSS
 * WooCommerce: product images, product and variation galleries, category images,
   placeholder and email header images
 * Advanced Custom Fields: image, file and gallery fields, including repeaters, 
   flexible content, ACF blocks, term fields and options pages
 * Custom fields of any plugin, user avatars, category and tag fields
 * Site settings: site icon, logo, header and background images, widgets (image,
   gallery, text, HTML and block widgets), theme option panels
 * Tables created by other plugins, such as sliders and form builders
 * Your active theme, parent theme and must-use plugins: stylesheets, templates 
   and scripts, including image IDs written in PHP

Drafts, private posts, revisions and trashed posts count as usage too: restoring
any of them will never bring back a broken image.

#### Built to be safe for your site

 * Scans run in the background in small batches, so large libraries do not hit server
   time limits, and they resume after an interruption.
 * Scanning only reads your content: nothing in your media library changes until
   you choose to quarantine files.
 * Data stored by other plugins is read without running any of their code.
 * No data leaves your site. No tracking, no external services, no account.

#### Page builders not supported yet

If the plugin detects a page builder it cannot read yet (for example Divi, Bricks,
Oxygen or Beaver Builder), it shows a warning and asks for an extra confirmation
before quarantining files. Review those results carefully, and use the quarantine
period to check your pages.

### Privacy

The plugin does not send any data outside your site and does not use cookies. To
detect quarantined files that are still requested, it stores the requested file 
path, the time and the address of the page that asked for it (without query string).
It does not store IP addresses or browser details.

## Screenshots

[⌊Scan results: media in use, not found in use and in quarantine, with selection
for quarantine.⌉⌊Scan results: media in use, not found in use and in quarantine,
with selection for quarantine.⌉[

Scan results: media in use, not found in use and in quarantine, with selection for
quarantine.

[⌊The "Why?" panel explains what was checked for every file.⌉⌊The "Why?" panel explains
what was checked for every file.⌉[

The “Why?” panel explains what was checked for every file.

[⌊Moving files to quarantine, with a clear explanation of what will happen.⌉⌊Moving
files to quarantine, with a clear explanation of what will happen.⌉[

Moving files to quarantine, with a clear explanation of what will happen.

[⌊The Quarantine tab: restore or delete permanently, one file or many at once.⌉⌊
The Quarantine tab: restore or delete permanently, one file or many at once.⌉[

The Quarantine tab: restore or delete permanently, one file or many at once.

## Installation

 1. Install Shift Media Library Cleanup from **Plugins > Add New**, or upload the plugin
    folder to `/wp-content/plugins/`.
 2. Activate it from the **Plugins** screen.
 3. Go to **Media > Media Cleanup** and click **Scan media library**.
 4. Review the **Not found in use** tab. Open **Why?** on any file to see what was 
    checked.
 5. Select files and click **Move to quarantine**. Browse your site for a few days,
    then let the quarantine expire or delete files permanently from the **Quarantine**
    tab.

We recommend a backup before any cleanup, as with any tool that removes files.

## FAQ

### Does the plugin delete files automatically?

No. A scan never changes anything. Files only leave your Media Library when you 
move them to quarantine, and they are deleted permanently only after the quarantine
period (30 days) or when you delete them yourself from the Quarantine tab.

### What happens to a file in quarantine?

Its files are moved to a private folder inside your uploads directory and the media
item is hidden from the Media Library. Its ID, title, alt text and other details
are kept, so a restore brings everything back exactly as before.

### How do I know a quarantined file is still needed?

When a visitor’s browser requests a quarantined file, the plugin counts it and shows
the page that requested it in the Quarantine tab. This works when missing files 
are handled by WordPress, which is the case on most Apache servers and many nginx
setups; some servers answer missing image requests on their own, and those requests
cannot be seen.

### Can the plugin miss a file that is in use?

It is designed to make that very unlikely, but it can happen with images loaded 
from places outside your site (another website, an email already sent, a mobile 
app) or by a plugin storing image IDs in a format nobody else uses. That is why 
removal always goes through the quarantine first.

### What about files that are not in the Media Library?

The plugin works with media items registered in the Media Library. Files copied 
to the uploads folder by other means are not listed and never touched.

### Why does the scan say it is too old?

Moving files to quarantine requires a scan from the last 24 hours, so recent changes
to your site are taken into account. Just run a new scan: it continues in the background.

### What happens when I uninstall the plugin?

Everything in quarantine is restored first, then the plugin removes its own data.
If a file cannot be restored because a new file now has the same name, its data 
is kept so that reinstalling the plugin shows it again.

### Does it work on multisite?

Yes. Each site of the network has its own scan and quarantine.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Shift Media Library Cleanup” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ shiftinnovation ](https://profiles.wordpress.org/shiftinnovation/)

[Translate “Shift Media Library Cleanup” into your language.](https://translate.wordpress.org/projects/wp-plugins/shift-media-library-cleanup)

### Interested in development?

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

## Changelog

#### 1.0.1

 * WPBakery: media used inside Raw HTML and Raw JS elements (stored encoded) are
   now found, in pages and in saved templates, and checked again before moving anything
   to quarantine.
 * Demo importer maps and remote content caches in site settings no longer count
   as usage.

#### 1.0.0

 * First public release.
 * Background scan of content, page builders, WooCommerce, ACF, settings, plugin
   tables and theme files.
 * “Why?” explanations for every file.
 * Quarantine with one-click restore, bulk actions, 404 detection and automatic 
   permanent deletion after 30 days.
 * Safety checks right before quarantine: scan age, content edited since the scan,
   file name search, shared files.

## Meta

 *  Version **1.0.1**
 *  Last updated **9 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.9 or higher **
 *  Tested up to **7.1.3**
 *  PHP version ** 8.1 or higher **
 * Tags
 * [clean media library](https://wordpress.org/plugins/tags/clean-media-library/)
   [delete unused media](https://wordpress.org/plugins/tags/delete-unused-media/)
   [image cleanup](https://wordpress.org/plugins/tags/image-cleanup/)[media cleaner](https://wordpress.org/plugins/tags/media-cleaner/)
   [unused images](https://wordpress.org/plugins/tags/unused-images/)
 *  [Advanced View](https://wordpress.org/plugins/shift-media-library-cleanup/advanced/)

## Ratings

No reviews have been submitted yet.

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

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

## Contributors

 *   [ shiftinnovation ](https://profiles.wordpress.org/shiftinnovation/)

## Support

Got something to say? Need help?

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