Ethwebs Media Cleanup

外掛說明

Ethwebs Media Cleanup keeps your WordPress Media Library tidy automatically. When you permanently delete a post, the plugin scans for its featured image and embedded images, verifies they are not used anywhere else on your site, and safely removes them along with all generated thumbnail sizes.

Key Features

  • Automatic deletion of featured images and content images upon post purge.
  • Safeguards shared images (will not delete if used in another post or page).
  • Keyword & Subfolder protection to protect logos, site assets, and advertisements.
  • Built-in Existing Orphaned Media Scanner with AJAX batching to handle 30,000+ images without server timeouts.
  • Chunked batch deletion system with real-time statistics counter and Cancel Deletion support.
  • Pause and Resume controls for long-running media library scans.
  • Client-side UI pagination (25 items per page) to ensure smooth browser rendering on massive media libraries.
  • Flexible selection controls: choose “Select Current Page” for page-by-page cleanup or “Select All (All Pages)” for bulk purging.
  • Interactive checkboxes for safe manual approval before deletion.
  • Completely lightweight with zero external dependencies.

螢幕擷圖

安裝方式

  1. Upload the ethwebs-media-cleanup folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to ‘Settings’ -> ‘Media Cleanup’ to configure protected keywords or run an orphan scan.

常見問題集

Does this delete images when I move a post to Trash?

No. Deletion only occurs when you permanently delete a post by clicking “Delete Permanently” or “Empty Trash”.

Will it delete my site logo, header assets, or sidebar ads?

No. You can define custom protected keywords (e.g., ad-, logo, banner, header) or protected subfolders under the settings page to prevent specific media from ever being deleted.

Should I protect media using image titles or actual filenames?

Always use the actual image filename (or file path URL) rather than the attachment title! Protection rules check the physical file name on your server (e.g., company-logo.jpg or ad-sidebar.png). If you add logo or ad- to your protected keywords list, any file containing those terms in its filename or URL path will be automatically skipped and preserved.

How does the scanner handle sites with tens of thousands of images?

The scanner uses a chunked AJAX batch processor (50 images per request) on the server, paired with DOM pagination (25 items per view) on the frontend. This prevents both server timeouts and browser freezing.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Ethwebs Media Cleanup〉的開發相關工作。

參與者

將〈Ethwebs Media Cleanup〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.2.9

  • Updated all prefixes from emc_ to ethwmc_ (6 characters) to meet WordPress.org minimum 4-character prefix requirement.

1.2.8

  • Renamed plugin to Ethwebs Media Cleanup using established brand identifier.
  • Separated inline JavaScript to an enqueued admin.js file.