Description
CrushEdge Orphaned Upload Cleaner is a lightweight, high-performance maintenance plugin designed to detect and clean up orphaned files inside your wp-content/uploads/ directory.
What is an “Orphaned Upload”?
In WordPress, an orphaned upload is a physical file present in your uploads directory that has no matching attachment record in the WordPress Media Library (wp_posts), nor is it a registered thumbnail/sub-size of an active attachment.
These “ghost files” accumulate over time from:
* Interrupted or cancelled media uploads.
* Deleted Media Library items where PHP unlinking failed or was skipped.
* Leftover files from uninstalled plugins, test imports, or manual FTP transfers.
* Old resized thumbnails left behind after themes or plugins change thumbnail dimensions.
Key Features
- “Only Orphan” Default: Automatically displays only orphaned uploads on load, with a single-click toggle to inspect all files in the uploads folder.
- Instant Sorting: Sort by File Name, Size, Modified Date, and Orphan Status (Ascending & Descending).
- Chunked Mass Deletion: Processes mass deletions in rapid asynchronous batches with live progress indicators (progress bar, percentage, count, and recoverable storage freed).
- Instant Cancel Support: Easily stop deletion at any time with instant abort.
- Direct Permanent Deletion: Permanently deletes files directly via WordPress core filesystem APIs to instantly reclaim disk space.
- Live Search & Pagination: Real-time search filter and customizable pagination (20, 50, 100, 200 items per page).
- Safety Whitelist: Automatically protects critical files like
.htaccess,index.php,web.config, and dynamic directories (e.g.,elementor/css,cache). - Path Traversal Guard: Strict directory containment verification preventing unauthorized access outside the uploads folder.
Installation
- Upload the
crushedge-orphaned-upload-cleanerdirectory to your/wp-content/plugins/directory. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Navigate to Tools CrushEdge Orphaned Upload Cleaner in your WordPress admin menu.
- Review the detected orphan files and perform single or bulk deletion.
FAQ
-
Does this delete images that are used in my posts?
-
CrushEdge Orphaned Upload Cleaner v1.0 scans files on disk and cross-references them against active Media Library attachment records (including all registered image sub-sizes and thumbnails). If an image exists in your WordPress Media Library, it is marked as “In Media Library” and is NOT considered an orphan.
-
Can deleted files be recovered?
-
No. Deletions are performed permanently using core WordPress file deletion APIs. We recommend taking a backup of your
wp-content/uploads/directory before performing large cleanup operations. -
Are core system files safe?
-
Yes. Critical server and WordPress files such as
.htaccess,index.php,web.config, and plugin cache/style folders are automatically whitelisted and cannot be deleted.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“CrushEdge Orphaned Upload Cleaner” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “CrushEdge Orphaned Upload Cleaner” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.1
- Renamed plugin display name to CrushEdge Orphaned Upload Cleaner and slug to crushedge-orphaned-upload-cleaner.
- Updated donation link and directory metadata.
1.0
- Initial public release.
- Interactive table with sorting by name, size, date, and orphan status.
- “Only Orphan” toggle filter enabled by default.
- Viewport-fixed progress modal with chunked batch processing and instant abort support.
- Nonce verification, permission checks, and path traversal protection.