Title: Unattached Media Manager
Author: sungraizfaryad
Published: <strong>21 Tháng 2, 2026</strong>
Last modified: 7 Tháng 9, 2026

---

Tìm kiếm plugin

![](https://ps.w.org/unattached-media-manager/assets/banner-772x250.png?rev=3685085)

![](https://ps.w.org/unattached-media-manager/assets/icon-256x256.png?rev=3685085)

# Unattached Media Manager

 Bởi [sungraizfaryad](https://profiles.wordpress.org/sungraizfaryad/)

[Tải về](https://downloads.wordpress.org/plugin/unattached-media-manager.1.3.1.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/unattached-media-manager/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/unattached-media-manager/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/unattached-media-manager/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/unattached-media-manager/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/unattached-media-manager/)

## Mô tả

#### Why This Plugin Is Different

**Most media cleaner plugins help you delete unused images. This plugin fixes a 
fundamental WordPress problem first.**

WordPress has a built-in “Unattached” filter in the Media Library. The idea is simple:
it shows you media files that aren’t connected to any post, so you can decide whether
to keep or delete them.

**The problem?** WordPress only marks media as “attached” if it was uploaded directly
through the post editor. Any image added through ACF fields, Gutenberg blocks, page
builders, widgets, theme options, or shortcodes shows as “Unattached” — even though
it’s actively being used on your site.

**This makes WordPress’s native “Unattached” filter completely unreliable.**

#### How Unattached Media Manager Fixes This

This plugin scans your entire site, finds every place where media files are actually
being used, and properly attaches them to their parent posts. Once attached:

 * **WordPress’s “Unattached” filter actually works** — It now shows only truly 
   unused media
 * **You can use WordPress’s native tools** — No need to depend on third-party plugins
   to manage media
 * **Import/export plugins work correctly** — Tools like WP All Import, WP Migrate,
   Duplicator, and others can now properly identify and migrate media with their
   associated posts
 * **You can safely uninstall this plugin** — The attachments remain as part of 
   WordPress’s native structure

#### The Workflow

 1. **Scan** — The plugin finds all media usage across your site (content, ACF, blocks,
    widgets, options, etc.)
 2. **Attach** — One-click to properly attach all “used but unattached” media to their
    parent posts
 3. **Review** — Now WordPress’s “Unattached” filter shows only genuinely unused files
 4. **Clean Up** — Use WordPress’s native tools OR this plugin’s safe deletion features
 5. **Done** — Uninstall if you want; the fixes stay with WordPress

#### Yes, It Also Deletes Unused Media

Like other media cleaners, this plugin also helps you safely delete unused media
with:

 * **Trash support** — Move to trash first, restore if needed
 * **Permanent delete** — Remove forever when you’re sure
 * **Change history** — Track all attachment changes with one-click revert

But the real value is **fixing WordPress’s attachment system** so you don’t need
to depend on any plugin long-term.

#### Two Processing Modes

 * **Browser-Driven (Recommended)** — Fast and reliable with real-time progress.
   Keep the browser tab open until complete.
 * **Background (WP-Cron)** — Processing continues even after closing your browser.
   Ideal for server cron setups.

#### Key Features

 * **Comprehensive Scanning** — Detects media usage in post content, featured images,
   Gutenberg blocks, ACF fields, Elementor, Meta Box, WooCommerce, SEO plugins, 
   widgets, theme options, and more
 * **Fix Unattached Media** — One-click to properly attach all “used but unattached”
   media
 * **Media Library Integration** — See usage count directly in your Media Library
   list view
 * **Safe Deletion** — WordPress trash support with restore capability
 * **Change History** — Full audit trail with one-click revert for any attachment
 * **Pause & Resume** — Stop any operation and continue later
 * **Resource Aware** — Three modes (Low/Auto/High) for shared hosting to dedicated
   servers
 * **Export Reports** — Download CSV reports of all media usage
 * **Developer Friendly** — Hooks, filters, REST API, and WP-CLI commands

#### The Problem It Solves

WordPress marks media as “Unattached” if it wasn’t uploaded directly to a post. 
But many media files ARE being used — they’re just embedded via:

 * The block editor (Gutenberg)
 * Page builders like Elementor or Beaver Builder
 * ACF image/gallery fields
 * WooCommerce product galleries
 * Theme customizer settings
 * Widget areas
 * Shortcodes
 * Custom meta boxes

**Unattached Media Manager finds ALL these references and properly attaches the 
media**, so WordPress correctly reflects which files are actually in use.

#### Server-Friendly Design

**This plugin is designed to work on ALL servers, including shared hosting with 
limited resources:**

 * **Never blocks your site** – All heavy operations are processed in batches
 * **Adaptive resource usage** – Automatically detects server limits and adjusts
   accordingly
 * **Three resource modes:**
    - **Low Resources** – 5 items/batch, 2-minute intervals (for shared hosting)
    - **Auto (Recommended)** – 15 items/batch, 1-minute intervals (adjusts automatically)
    - **High Performance** – 50 items/batch, 30-second intervals (for dedicated 
      servers)
 * **Two processing strategies** – Choose browser-driven (fast) or background WP-
   Cron mode

#### Supported Content Types

**ALL features below are FREE – no Pro version required!**

 * **Post Content** – Classic editor, Gutenberg blocks, shortcodes, inline styles,
   data attributes
 * **Featured Images** – Thumbnail assignments
 * **ACF Fields** – Image, gallery, file, repeater, flexible content, and group 
   fields
 * **Gutenberg Blocks** – Core image, gallery, cover, media & text blocks
 * **Elementor** – All widgets, backgrounds, galleries, sliders, and responsive 
   images
 * **Meta Box** – All field types including groups and cloneable fields
 * **WooCommerce** – Product galleries, variation images, downloadable files, category
   thumbnails
 * **SEO Plugins** – Yoast SEO, Rank Math, All in One SEO, SEOPress (OpenGraph &
   Twitter images)
 * **Widgets** – Image widgets, text widgets with media, custom HTML
 * **Theme Options** – Customizer settings, theme mods, custom logos
 * **Options Table** – Plugin settings that store media IDs or URLs
 * **Video & Audio** – HTML5 video/audio elements, poster images, source tags
 * **Responsive Images** – srcset attributes and lazy-loading data attributes

#### For Developers

Unattached Media Manager is built with extensibility in mind:

 * **Hooks & Filters** – Extend scanning with custom parsers
 * **REST API** – Query media usage programmatically
 * **WP-CLI Commands** – Run scans from the command line (`wp unmam scan`)
 * **Custom Post Types** – Automatically scans all public post types

### How to Use

#### Step 1: Run Your First Scan

 1. Navigate to **Media  Media Solution**
 2. Click **Start Full Scan**
 3. Choose your processing mode (Browser-Driven recommended for most users)
 4. Watch the real-time progress as your media library is scanned

#### Step 2: Review the Dashboard

After scanning, you’ll see:

 * **Total Media Files** – All attachments in your library
 * **In Use** – Media files with detected references
 * **Potentially Unused** – Media files with no detected references
 * **Used but Unattached** – Media that’s used but marked as “Unattached” in WordPress
 * **Total References** – Total number of places media is referenced

#### Step 3: Fix Unattached Media

If you have “Used but Unattached” media:

 1. Click the **Attach All Media Files** button
 2. The operation runs in the background
 3. Each attachment is tracked in Change History for easy reverting

#### Step 4: Clean Up Unused Media

Go to the **Unused Media** tab to:

 1. **Review** – Check each file before taking action
 2. **Move to Trash** – Safely move to WordPress trash (can be restored)
 3. **Restore** – Bring items back from trash if needed
 4. **Delete Permanently** – Remove forever (cannot be undone)
 5. **Empty Trash** – Delete all trashed media at once

**Important:** All bulk operations run in the background. You’ll see a status bar
showing progress.

#### Step 5: Review Change History

The **Change History** tab shows:

 * All attachments made by this plugin
 * When each change occurred
 * What post each media was attached to
 * Option to **Revert** any change (detaches the media)

### Important Precautions

#### Before Deleting Any Media

 1. **Always run a full scan first** – Make sure the index is up to date
 2. **Review files manually** – The scanner detects database references, but images
    might be:
 3.  * Hardcoded in theme PHP files
     * Used by external websites linking to your images
     * Referenced in custom code or third-party plugins not yet supported
     * Used in email templates stored outside WordPress
 4. **Use Trash first** – Move to trash instead of deleting permanently
 5. **Know what the trash does** – Trashing changes an item’s status. It does not remove
    the file or break anything on your site. See below.

#### What Trashing Does And Does Not Do

Moving media to the trash only changes its status in the database. The file stays
on your
 server, and any image already placed in your content keeps displaying exactly
as before.

This matters because it is tempting to trash a batch of “unused” files and then 
browse the
 site looking for broken images to find the mistakes. That does not work.
Nothing will look broken, whether the files were genuinely unused or not. Images
only break after a permanent delete, which is the point where it is too late to 
learn from them.

Two things that do reliably tell you whether a file is in use:

 * **Your server access logs.** Search them for requests under /wp-content/uploads/
   over the
    last month or two. Files that no browser has ever requested are genuinely
   unused. This also catches images that other websites link to, which no plugin
   can detect.
 * **A staging copy.** Clone the site, permanently delete there, then crawl it with
   a broken
    link checker. You get a real list of what breaks with no risk to the
   live site.

Also worth knowing: WordPress empties the trash automatically. Items sitting in 
the trash
 longer than the EMPTY_TRASH_DAYS setting, 30 days by default, are deleted
permanently on a schedule, and for media that removes the files from your server.
You do not have to click Empty Trash for this to happen. If you are keeping things
in the trash deliberately while you check them, raise EMPTY_TRASH_DAYS in wp-config.
php first.

#### About “Potentially Unused” Media

Files marked as “Potentially Unused” means:

 * No references were found in the scanned content
 * **This doesn’t guarantee the file is unused**
 * The file might be used in ways not detected:
    - Theme template files (hardcoded)
    - External sites linking to your images
    - Custom plugins with non-standard storage
    - CSS background images defined in stylesheets
    - JavaScript-loaded images

#### Recommended Workflow

 1. **Scan** – Run a full scan with all content types enabled
 2. **Review** – Look at the Unused Media tab
 3. **Research** – For each file, consider where it might be used
 4. **Trash** – Move questionable items to trash (not permanent delete)
 5. **Verify** – Check your server access logs for requests to those files, or test
    the
     deletion on a staging copy. Do not wait for broken images to appear, because
    trashing never produces any
 6. **Delete** – Only permanently delete after confirming no issues

#### Server Resources

 * **Shared Hosting** – Use “Low Resources” mode in settings
 * **If operations timeout** – Switch to Low Resources mode
 * **Large media libraries** – The scan may take longer but will complete
 * **WP Cron must work** – Ensure WordPress cron is running (check with your host)

### Privacy Policy

Unattached Media Manager does not:

 * Collect any personal data
 * Send any data to external servers
 * Use any third-party services
 * Track users or usage

All data is stored locally in your WordPress database in custom tables that are 
removed when you uninstall the plugin.

### Uninstallation

When you uninstall (delete) the plugin:

 * All custom database tables are removed
 * All plugin options are deleted
 * All plugin transients are cleared
 * All scheduled cron events are removed
 * Post meta created by the plugin is deleted

**Note:** Attachment relationships (post_parent) that were set by this plugin are
NOT removed, as these are now part of WordPress’s native media library structure.
If you need to revert these, use the Change History tab before uninstalling.

### Credits

 * Built with love for the WordPress community
 * Icons from WordPress Dashicons
 * Inspired by the need to keep media libraries clean and organized

## Ảnh màn hình

[⌊Dashboard - Overview of media usage statistics (Total Media Files, In Use, Unused,
Unattached).⌉⌊Dashboard - Overview of media usage statistics (Total Media Files,
In Use, Unused, Unattached).⌉[

**Dashboard** – Overview of media usage statistics (Total Media Files, In Use, Unused,
Unattached).

[⌊Fix Unattached Media - Displaying used media files that need to be attached and
organized.⌉⌊Fix Unattached Media - Displaying used media files that need to be attached
and organized.⌉[

**Fix Unattached Media** – Displaying used media files that need to be attached 
and organized.

[⌊Unused Media - Review all potentially unused media and safely move them to trash.⌉⌊
Unused Media - Review all potentially unused media and safely move them to trash
.⌉[

**Unused Media** – Review all potentially unused media and safely move them to trash.

[⌊Change History - Complete audit trail of all changes made by the plugin, with 
options to revert.⌉⌊Change History - Complete audit trail of all changes made by
the plugin, with options to revert.⌉[

**Change History** – Complete audit trail of all changes made by the plugin, with
options to revert.

[⌊Settings Page - Configure server resource usage (Low, Auto, High) and background
processing behavior.⌉⌊Settings Page - Configure server resource usage (Low, Auto,
High) and background processing behavior.⌉[

**Settings Page** – Configure server resource usage (Low, Auto, High) and background
processing behavior.

[⌊References by Context - Detailed breakdown of exactly where media is being used(
Metabox, Post Content, Gutenberg, etc.).⌉⌊References by Context - Detailed breakdown
of exactly where media is being used (Metabox, Post Content, Gutenberg, etc.).⌉[

**References by Context** – Detailed breakdown of exactly where media is being used(
Metabox, Post Content, Gutenberg, etc.).

[⌊Potentially Unused Media Details - View specific media files identified as having
no references before taking action.⌉⌊Potentially Unused Media Details - View specific
media files identified as having no references before taking action.⌉[

**Potentially Unused Media Details** – View specific media files identified as having
no references before taking action.

[⌊Attachment Settings - Choose which content areas (Post Content, Featured Images,
ACF Fields, Widgets, Theme Options) are actively scanned.⌉⌊Attachment Settings -
Choose which content areas (Post Content, Featured Images, ACF Fields, Widgets, 
Theme Options) are actively scanned.⌉[

**Attachment Settings** – Choose which content areas (Post Content, Featured Images,
ACF Fields, Widgets, Theme Options) are actively scanned.

## Cài đặt

 1. Upload the `unattached-media-manager` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Go to **Media  Media Solution** to access the dashboard
 4. Click **Start Full Scan** to begin indexing your media references

#### Minimum Requirements

 * WordPress 5.8 or higher
 * PHP 7.4 or higher
 * MySQL 5.6 or higher

#### Recommended

 * PHP memory_limit of 256M or higher
 * max_execution_time of 60 seconds or higher

## Hỏi đáp

### Will scanning slow down my site?

No. The scanner processes items in small batches and automatically adjusts its resource
usage. Visitors to your site won’t notice any slowdown.

### Can I close my browser during operations?

It depends on your chosen processing mode. With **Browser-Driven mode** (recommended),
you need to keep the tab open. With **Background (WP-Cron) mode**, operations continue
even after closing your browser — though this requires WP-Cron to be working properly
on your site.

### What if I accidentally delete something?

If you used “Move to Trash” instead of “Delete Permanently”, you can restore from
the Trash view in the Unused Media tab. This is why we recommend always using Trash
first.

### What if I attached media incorrectly?

Go to the **Change History** tab and click **Revert** on any change. This will detach
the media from the post it was attached to.

### What happens if the scan gets stuck?

You can pause the scan at any time and resume it later. If something goes wrong,
use the Stop button to reset and start fresh.

### Does this work with page builders?

Yes. Unattached Media Manager scans all post content, which includes content created
by page builders like Elementor, Beaver Builder, Divi, and others. The scanner looks
for both image IDs and URLs in the content.

### Does this work with ACF?

Yes. There’s a dedicated ACF parser that understands image fields, gallery fields,
file fields, repeaters, flexible content, and group fields.

### Will it detect images added via code/theme?

If images are stored in the database (post meta, options, theme mods), they will
be detected. Images hardcoded in PHP theme files are not detected as they’re not
stored in the database.

### Is it safe to delete media marked as “unused”?

**Always review before deleting!** The scanner indexes database references, but 
images might be:
 – Hardcoded in theme files – Used by external services – Linked
from other websites – Used in custom code

We strongly recommend using Trash first and waiting a few days before permanently
deleting.

### I trashed unused media but the images are still showing. Is it broken?

No, that is how WordPress works. Trashing media only changes its status. The file
stays on
 your server and images already placed in your content keep displaying,
so you will not see broken images either way. Use your server access logs or a staging
copy to confirm what is really in use, and see “What Trashing Does And Does Not 
Do” above.

### Will my trashed media stay in the trash until I empty it?

No. WordPress deletes trashed items automatically once they are older than the
 
EMPTY_TRASH_DAYS setting, which is 30 days by default, and for media that deletes
the files from your server too. If you want to keep things in the trash for longer
while you check them, raise that value in wp-config.php.

### The Trash buttons are missing. Why?

Your site has EMPTY_TRASH_DAYS set to 0 in wp-config.php, which disables the WordPress

trash entirely. With that setting a “move to trash” would delete files immediately
and permanently, so the plugin hides those buttons rather than destroy media behind
a button labelled Trash. Set EMPTY_TRASH_DAYS to a positive number to get them back.

### Does this work with Multisite?

Currently, Unattached Media Manager works on individual sites. Network-wide scanning
for Multisite is planned for a future release.

### My server has very limited resources. Will this work?

Yes! Set the Resource Mode to “Low Resources” in Settings. This uses smaller batches(
5 items) with longer intervals (2 minutes) to prevent timeouts on shared hosting.

### How do I extend the scanner?

Use the `unmam_parsers` filter to add custom parsers:

    ```
    add_filter( 'unmam_parsers', function( $parsers ) {
        $parsers['my_custom'] = new My_Custom_Parser();
        return $parsers;
    } );
    ```

Your parser should implement the `UNMAM_Parser_Interface`.

## Đánh giá

![](https://secure.gravatar.com/avatar/1ccfcb1daa6c0b064e043799302012690fa5cfd4301d6e50bc08f2795cebe87b?
s=60&d=retro&r=g)

### 󠀁[Brilliant plugin with awesome support!](https://wordpress.org/support/topic/brilliant-plugin-with-awesome-support/)󠁿

 [Gal Baras](https://profiles.wordpress.org/galbaras/) 5 Tháng 6, 2026 3 trả lời

This plugin provides a very comfortable interface for fixing media attachment issues
and getting rid of redundant media files. After using it a bit, I made some suggestions
to the author and the response was just superb. I hope this plugin will soon be 
featured by WordPress, because it's very useful.

![](https://secure.gravatar.com/avatar/c8035ba70202f3b0d8dce3285823b553cad01d2278d7b3e3169fb80e08d675f5?
s=60&d=retro&r=g)

### 󠀁[Genuinely useful and well written plugin!](https://wordpress.org/support/topic/genuinely-useful-and-well-written-plugin/)󠁿

 [Mike Fitzpatrick](https://profiles.wordpress.org/mikefitzman/) 28 Tháng 4, 2026
2 trả lời

I came across this plugin almost by accident, but I'm so glad I did. The unattached
media thing had bugged me for years. This one simple plugin fixed all that in minutes!
It scans your media library and presents a range of super-useful data and options
for how to attach media and delete unused files. The UI is really nice, it's easy
to use, highly recommended.

 [ Đọc tất cả 1 đánh giá ](https://wordpress.org/support/plugin/unattached-media-manager/reviews/)

## Người đóng góp & Lập trình viên

“Unattached Media Manager” là mã nguồn mở. Những người sau đã đóng góp vào plugin
này.

Những người đóng góp

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

[Dịch “Unattached Media Manager” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/unattached-media-manager)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/unattached-media-manager/),
check out [SVN repository](https://plugins.svn.wordpress.org/unattached-media-manager/),
hoặc theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/unattached-media-manager/)
qua [RSS](https://plugins.trac.wordpress.org/log/unattached-media-manager/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### 1.3.1

**Fixes files sold through WooCommerce product variations being reported as unused.**

 * **Downloadable files on product variations were never scanned.** The check ran
   against the parent product, and a variable product is not itself downloadable,
   so files attached to its variations were invisible and could appear in the Unused
   list. Files in `woocommerce_uploads` are the common case. Reported by @galbaras.
   Downloadable files on simple products were already handled and are unaffected.
 * **Images on hidden or disabled product variations were also missed**, because
   only purchasable, visible variations were being read. All variations are now 
   scanned, whatever their status.

If you sell downloadable products with variations, re-run a full scan after updating.

#### 1.3.0

**Media attached to categories, tags and custom taxonomy terms is now found.**

Nothing in the plugin read term meta before this release. If you used a plugin such
as Advanced Custom Fields to put an image on a category, a product category or any
other taxonomy term, that image was invisible to the scanner and was reported as
unused. This was the single most common cause of a genuinely used file appearing
in the Unused list.

 * **Taxonomy terms are now scanned.** A new scan step reads the data stored on 
   every term in the taxonomies you have selected. Media found there is protected
   from deletion.
 * **Scanning terms is on by default.** After updating, every taxonomy on your site
   is selected automatically. You can untick individual taxonomies under Settings,
   and anything you untick stays unticked.
 * **New taxonomies are picked up on their own.** Register a taxonomy later and 
   it is added to the scan, the same way post types have worked since 1.2.0.
 * **Wider ACF field coverage, on both posts and terms.** WYSIWYG, Textarea, Text,
   URL, Link, oEmbed and Icon Picker fields are now read for media, alongside the
   Image, Gallery and File fields that were already supported.
 * **Media referenced inside stored HTML is now found.** A custom field holding 
   a block of markup (rather than a tidy single value) has its image tags and upload
   links read properly.
 * **Where Used shows terms.** A file used on a term now names the term and links
   to it, in the media modal, the REST API and WP-CLI.
 * **Replace Media works on terms.** Replacing a file now updates references held
   in term meta.
 * **Fixed: the REST and WP-CLI scan commands could not run every step.** Both had
   a hardcoded list of scan steps that had fallen out of date, so the custom database
   tables step was unreachable through them. Both now follow the real pipeline.

**If you added `wp_termmeta.meta_value` under Custom Database Tables as a workaround,
you can remove it after running a full scan on this version.**

Your unused count may go down after updating, because files that were wrongly listed
as unused are now correctly recognised as in use. Re-run a full scan after updating.

#### 1.2.0

This release is mostly about the accuracy of the Unused list, in both directions.

**Media that was in use but reported as unused**

 * **Post types added after the plugin were never scanned.** The list of post types
   to scan was stored once and never refreshed, so installing any plugin that registers
   its own post type (WooCommerce is the common case) left everything in it unscanned,
   and all of its images looked unused. The list is now reconciled against what 
   is actually registered. Post types you have deliberately unticked stay unticked.
 * **Only publicly visible post types could be scanned.** That excluded page-builder
   template types, and in stock WordPress it also excluded reusable blocks (patterns)
   and navigation menus. Any post type with an admin screen can now be scanned.
 * **Saving a post and running a full scan disagreed.** Saving indexed any post 
   type while a full scan honoured the allow-list, so a scan could delete references
   that saving had just created. Both now use the same list.
 * **The WooCommerce and SEO parsers were never actually run for site-wide media.**
   The WooCommerce placeholder image, WooCommerce product category thumbnails, and
   the default OpenGraph images for Yoast and Rank Math were all unprotected despite
   the code for them existing.
 * **The settings scan was capped and filtered.** It only looked at options whose
   name matched one of five patterns, then stopped after 1000 rows with no warning.
   It now scans every option except a small skip list, resumes across batches, and
   records anything skipped for being oversized.
 * **Media URLs inside settings were only found under certain key names** (url, 
   src, image, logo, icon, background). Any other key was ignored.

**Media that was not in use but reported as used**

 * **Filename matching was too loose.** A file called `A.png` also matched `banana.
   png`, so the wrong attachment was credited with the reference. That kept unrelated
   files out of the Unused list, and could leave the file that really was referenced
   looking unused. Matching is now anchored to the whole filename. CDN and changed-
   domain URLs still resolve.
 * **The Meta Box parser treated every numeric custom field as an attachment ID**,
   so prices, user IDs and statuses became media references.
 * **`wp-image-{ID}` classes and `data-id` attributes were trusted without checking
   the ID.** Those survive content being copied between sites. They are now verified,
   and fall back to reading the image URL instead, which finds more than before.

**Trash**

 * **New “Restore All” button.** Trashing every unused file was already one click,
   but restoring had to be done one page at a time.
 * **The trash buttons have been reordered.** Restore now comes first, with Delete
   Permanently and Empty Trash separated to the right. Restore previously sat between
   the two destructive buttons.
 * **New page size control** (20, 50, 100, 200) on the Unused and Trash lists, which
   were fixed at 20.

**Also**

 * Fixed `wp unmam stats`, which printed “Invalid field: Metric” instead of any 
   statistics.
 * Reference rows that point at deleted attachments are no longer created, so the
   count shown by WP-CLI and the count shown in the admin now agree.

#### 1.1.1

 * **Fix (data loss):** On sites with `EMPTY_TRASH_DAYS` set to 0 the WordPress 
   trash is disabled, and “Move to Trash” silently deleted the file from the server
   while reporting that it had been trashed. The plugin now refuses to trash on 
   those sites, hides the Trash buttons, and explains why.
 * **New:** The Trash view now states plainly that trashed files remain on the server
   and that images already placed in your content keep displaying, so a trashed 
   file that is still in use will not show up as a broken image.
 * **New:** The Trash view warns that WordPress empties the trash automatically 
   after `EMPTY_TRASH_DAYS` (30 by default), which permanently deletes the files,
   without anyone clicking Empty Trash.
 * **Docs:** Corrected the deletion guidance in the readme. Previous versions suggested
   watching the site for missing images after trashing, which can never happen and
   gave a false sense of safety. Replaced with methods that actually work (server
   access logs, staging copy).

#### 1.1.0

 * **New:** “Copy URL” button on each row of the Unused Media tab — grab a file’s
   public URL in one click, with a fallback for sites served over plain HTTP.
 * **New:** The “View” action now opens the actual file (e.g. /wp-content/uploads/…/
   image.jpg) in a new tab instead of the attachment editor, so you can see the 
   full-size file straight away. The title link still goes to the editor.
 * **New:** “Export URLs (CSV)” button on the Unused Media tab, plus `wp unmam unused--
   format=csv`, to export the list of unused file URLs — handy for comparing against
   a site crawl. The full media report (Export Report) now includes a URL column
   too.
 * **New:** Exclude files from the Unused list. Click “Exclude” on any row and it
   disappears from the report (and stops counting toward the unused total). Excluded
   files live under a new “Excluded” view where you can bring them back with “Include”.
   This reuses the existing “Marked Safe” flag, so files marked safe in the Media
   Library are excluded here as well.
 * **Fix:** WP-CLI help examples referenced `wp mui`; the command is `wp unmam`.
   Updated throughout.

#### 1.0.9

 * **New:** “Custom Database Tables (Advanced)” setting. Some plugins store content(
   and the media URLs inside it) in their own database tables rather than in posts
   or options — newsletter plugins are a common example. You can now list those `
   table.column` locations and the scanner will read them, protecting any referenced
   media from being flagged as unused.
 * **Security:** Each table/column entry is strictly validated against the live 
   database schema before any query runs — only existing tables (within this site’s
   table prefix) and text columns are accepted, and all queries are read-only. Invalid
   entries are reported back rather than silently dropped.
 * **Note:** Media discovered in a custom table is protected from deletion but is
   not attached to a post (there is no post to attach it to) — it simply stops appearing
   in the Unused list.
 * **Internal:** The scan pipeline now derives its step list from a single source
   of truth, so the custom-tables step integrates cleanly and existing installs 
   that don’t use it behave exactly as before.

#### 1.0.8

 * **New:** “Post Types to Scan” section on the Settings page. The scanner now auto-
   discovers every public post type registered by your theme or plugins (e.g. Projects,
   Portfolio, Events) and lets you tick the ones to include. Custom post types are
   scanned by default on new installs.
 * **New:** Existing 1.0.7 installs automatically receive the new setting populated
   with all currently registered public post types on the first read after upgrade—
   no rescan or re-activation required.
 * **New:** `unmam_scan_post_types` filter for developers who want to override the
   allow-list programmatically.
 * **Fix:** Save Settings button was a no-op in 1.0.7 — form field names did not
   match the save handler, so all toggle changes were silently discarded. Settings
   now persist correctly.
 * **Improved:** Tampered form submissions can no longer register arbitrary post-
   type slugs; the save handler intersects against currently registered public types.

#### 1.0.7

 * **Confirmed compatibility with WordPress 7.0**
 * **New:** Filter Unused Media by filename, mime type, and upload date range
 * **Improved:** Skip `_mfrh_history` and `_original_filename` meta keys (Media 
   File Renamer plugin internals — not actual media references)
 * **Improved:** Confirmed Rank Math Schema video thumbnail meta (`rank_math_schema_VideoObject`)
   is matched by the generic post meta walker

#### 1.0.3 – 1.0.6

 * Maintenance releases: WordPress.org SVN asset structure fixes (banner, icon, 
   screenshots), readme metadata updates. No functional code changes.

#### 1.0.0

 * Initial release
 * **Scanning Features:**
    - Comprehensive media scanning across posts, ACF, blocks, widgets, and options
    - Dual processing modes: Browser-Driven (fast) or Background (WP-Cron)
    - Pause and resume functionality
    - Adaptive resource management (Low/Auto/High modes)
 * **Media Management:**
    - One-click fix for unattached media
    - Trash/restore functionality for safe deletion
    - Permanent delete option for confirmed unused media
    - Bulk operations for trash, restore, and delete
    - Empty trash function
 * **Tracking & Safety:**
    - Full change history with audit trail
    - One-click revert for any attachment change
    - Background job queue for all bulk operations
    - Universal stop button for any operation
 * **Developer Tools:**
    - REST API endpoints
    - WP-CLI commands (`wp aioms`)
    - Extensible parser system
 * **UI/UX:**
    - Media Library integration with usage counts
    - CSV export functionality
    - Real-time progress updates
    - Sticky status bar for background operations

## Meta

 *  Phiên bản **1.3.1**
 *  Cập nhật lần cuối **2 tháng trước**
 *  Số lượt cài đặt **300+**
 *  Phiên bản WordPress ** 5.8 hoặc cao hơn **
 *  Đã kiểm tra lên đến **7.1.4**
 *  Phiên bản PHP ** 7.4 hoặc cao hơn **
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/unattached-media-manager/)
 * Thẻ
 * [attachments](https://vi.wordpress.org/plugins/tags/attachments/)[cleanup](https://vi.wordpress.org/plugins/tags/cleanup/)
   [media cleaner](https://vi.wordpress.org/plugins/tags/media-cleaner/)[media library](https://vi.wordpress.org/plugins/tags/media-library/)
   [unused media](https://vi.wordpress.org/plugins/tags/unused-media/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/unattached-media-manager/advanced/)

## Đánh giá

 5 trên 5 sao.

 *  [  2 5-star reviews     ](https://wordpress.org/support/plugin/unattached-media-manager/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/unattached-media-manager/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/unattached-media-manager/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/unattached-media-manager/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/unattached-media-manager/reviews/?filter=1)

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

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/unattached-media-manager/reviews/)

## Những người đóng góp

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

## Hỗ trợ

Các lỗi đã xử lý trong vòng hai tháng gần đây:

     0 trên 3

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/unattached-media-manager/)