As a WordPress site owner or administrator, you know how quickly the Media Library can become cluttered with unused images. Every time you draft, edit, or delete posts over time, orphaned attachments and resized thumbnail variations linger on your web server—wasting valuable disk space and slowing down database queries.
To solve this problem cleanly and safely, we are excited to announce our latest official plugin approved on the WordPress.org Directory: Ethwebs Media Cleanup.
What is Ethwebs Media Cleanup?
Ethwebs Media Cleanup is a lightweight, high-performance utility designed to keep your WordPress uploads directory tidy without risking the deletion of vital site assets.
It handles media management on two fronts:
-
Real-time Auto-Deletion: Automatically removes associated featured images, embedded content media, and all generated thumbnail sizes when a post is permanently deleted.
-
On-Demand Batch Scanner: Scans your existing library for orphaned images uploaded in the past that are no longer linked to active posts.
Key Features & Highlights
-
Automatic Cleanup on Post Purge: When you click “Delete Permanently” or empty your trash, the plugin automatically detects and deletes associated media files.
-
Shared Asset Protection: Before deleting any file, the plugin checks your entire site database. If an image is used in another post, page, or custom post type, it is automatically preserved.
-
Smart Keyword & Folder Exclusion: Protect site logos, headers, background banners, and advertisement graphics simply by adding keywords (like
logo,banner,ad-) or folder paths to your protection list. -
Built for Large Websites (30,000+ Images): Powered by an AJAX batching engine (processing 50 images per request) and client-side pagination (25 items per view), the scanner runs smoothly on massive sites without hitting server timeouts or browser memory limits.
-
Pause, Resume, & Cancel Controls: Full control during long scans or large deletion operations, with real-time status counters and instant cancel safety checks.
-
Zero External Dependencies: Built natively using WordPress core standards for optimal performance and security.
Protecting Essential Files: Title vs. Filename
One crucial setting to keep in mind when configuring your protection rules: always use actual file names or path terms rather than attachment titles.
Protection filters inspect the physical file URL stored on your server (for instance,
company-logo.png or ad-sidebar-banner.jpg). Adding terms like logo or ad- to your protected keywords list ensures that any file containing those terms in its physical filename will be skipped during auto-deletion and orphan scans.Frequently Asked Questions
Q: Does it delete images when I move a post to the Trash?
No. Deletion only occurs when you permanently delete a post by clicking “Delete Permanently” or when emptying the Trash.
Q: Will it affect my site logo or sidebar advertisements?
No. You can explicitly list protected keywords (e.g.,
logo, header, banner, ad-) or upload subfolders in the plugin settings to guarantee those files are never touched.How to Install
-
Log into your WordPress Admin Dashboard.
-
Navigate to Plugins -> Add New.
-
Search for Ethwebs Media Cleanup.
-
Click Install Now, then Activate.
-
Head over to Settings -> Media Cleanup to configure your keyword exclusions or run your first orphaned media scan!
You can also download the plugin files directly from the official repository:
