[WordPress] 外掛分享: MCOD Delete Media by Content

首頁外掛目錄 › MCOD Delete Media by Content
WordPress 外掛 MCOD Delete Media by Content 的封面圖片
全新外掛
安裝啟用
尚無評分
剛更新
最後更新
問題解決
WordPress 5.0+ PHP 7.4+ v1.0.2 上架:2026-03-04

內容簡介

MCOD Delete Media by Content 可依據文章類型批次刪除 WordPress 媒體庫中的附件檔案,透過智慧交叉比對排除機制保護仍在使用中的媒體,有效清理孤立檔案、釋放主機 inode 資源。

【主要功能】
• 依文章類型批次刪除媒體附件
• 可篩選僅刪除圖片、PDF、影片或音訊等特定類型
• 跨文章類型交叉排除,防止誤刪共用媒體
• 預覽模式可先檢視將被刪除的檔案清單
• 可設定每批次處理數量,避免主機逾時
• 支援 WooCommerce 商品圖庫與 ACF 欄位偵測

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「MCOD Delete Media by Content」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

MCOD Delete Media by Content allows you to bulk delete WordPress media files attached to a specific post type. Whether you need to clean up orphaned images from deleted WooCommerce products, remove PDFs tied to a custom post type, or purge an unused media library section after a content migration, this plugin handles the process in batches.
Use it to clean your WordPress media library without touching media that is actively used elsewhere on your site based on your exclusions.
Free Up Server Inodes:
Hosting servers have a limit on the number of files (inodes) they can store, regardless of disk space. Each WordPress attachment generates multiple thumbnail files, which rapidly consumes inodes. When the inode limit is reached, no new files can be created on the server. This plugin permanently deletes media files and all their generated thumbnails from the filesystem in batches, helping to reduce your inode count and restore your server’s ability to handle new uploads.
Dual Detection Strategy:
This plugin uses a dual detection strategy to find media linked to your chosen post type by checking multiple fields:
1. Direct Parent: Attachments whose post_parent points to a post of the selected type.
2. Meta References: Attachment IDs stored in postmeta — including WooCommerce product galleries (_product_image_gallery), ACF Image & Gallery fields, featured images saved as meta, and any other custom field referencing an attachment ID.
This helps identify attachments properly without inadvertently affecting active media from other areas.
Smart Cross-Type Exclusions — Protect Shared Media:
Before deleting, the plugin cross-checks each attachment against other post types you select. If a product image is also used as a featured image on a Page or referenced in a Post, it will be automatically skipped — preventing broken images across your site.
Key Features:

Bulk Delete by Post Type: Target Products, Pages, Posts, or any registered custom post type.
Media Type Filter: Scope deletion to Images only, PDFs, Videos, Audio, or all attachments.
Cross-Type Exclusions: Protect attachments shared with other post types from accidental deletion.
Preview Mode: Count and preview a sample of media to be deleted (with direct edit links) before running.
Safe Batch Processing: Processes in configurable batches of 1–100 items to avoid PHP/server timeouts on large media libraries.
Real-Time Progress Log: Live status updates so you always know what is happening.
WooCommerce & ACF Compatible: Detects images in product galleries, ACF image/gallery fields, and other postmeta.
Fully Translatable: Internationalization-ready with a .pot file included.

⚠️ This plugin permanently deletes media files from the database and the server filesystem. Always create a full backup before running any deletion.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon