
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
- Trash Can Safety Quarantine: Default “Move to Trash” action safely isolates orphaned files inside a protected directory (
.crushedge-trash/) with web access lockdown (.htaccessandweb.config), completely eliminating accidental data loss. - 1-Click Single & Bulk Restore: Restore any file, selected files, or all files back to their original locations in
uploads/with a single click. - Empty Trash & Permanent Purge: Safely purge individual files, selected items, or empty the entire Trash Can when ready.
- WordPress-Style Row Actions: Clean hover action links under filenames (
Move to Trash | Delete Permanently | Ignore Folderfor active files;Restore | Delete Foreverin Trash Can), keeping the primary action button column compact and uncluttered. - Sticky Table Headers: Table headers remain pinned to the top of the viewport (
position: sticky; top: 32pxdesktop /46pxmobile) when scrolling through long lists (20–200 items), with automatic WordPress admin bar offset compensation. - 1-Click “Copy Path” Badges: Clickable relative path badges (
uploads/...) with instant clipboard copy, animated checkmark feedback, and floating toast notifications. - In-App Confirmation Dialogs: Clean, responsive confirmation modals with file previews and metadata replacing browser alert popups.
- Lightbox Image Preview: Click any image thumbnail to inspect high-resolution images in an inline modal without leaving the page.
- “Only Orphan” Default: Automatically displays only orphaned uploads on load, with a single-click toggle to inspect all files in the uploads folder.
- Smart Image Derivative Resolution: Intelligently recognizes auto-generated thumbnails (
-150x150,-300x200), scaled images (-scaled), edits (-e123...), and modern Next-Gen companion files (.webp,.avif). If the parent image is in the Media Library, derivative files are automatically linked and protected from deletion. - Expanded Plugin Whitelist: Automatically shields 3rd-party plugin storage folders from being treated as orphans, including WordPress Download Manager (
download-manager-files,wpdm-files), WooCommerce (woocommerce_uploads,wc-logs), Elementor, form uploads (Gravity Forms, WPForms, Fluent Forms, Formidable, Ninja Forms), backups (UpdraftPlus, Duplicator, All-in-One WP Migration), and caching systems. - User-Configurable Excluded Folders & Patterns: Add custom folder names (e.g.,
my-custom-folder) or wildcard patterns (e.g.,*.zip) to exclusions. - “Ignore Folder” Quick Action: Quickly ignore any folder right from the table row with date-structure warning protections.
- Deep Scan Content Reference Checker: Cross-references published post and page HTML content to ensure files actively embedded on your site are locked and protected.
- Developer Hooks: Fully extensible with
crushedge_orphan_protected_dirs,crushedge_orphan_protected_files, andcrushedge_orphan_is_file_protectedfilters. - Instant Sorting: Sort by File Name, Size, Modified Date, and Orphan Status (Ascending & Descending).
- Chunked Mass Actions: Processes mass move-to-trash, restore, and deletions in rapid asynchronous batches with live progress indicators.
- Instant Cancel Support: Easily stop batch processing at any time with instant abort.
- Live Search & Pagination: Real-time search filter and customizable pagination (20, 50, 100, 200 items per page).
- Path Traversal Guard: Strict directory containment verification preventing unauthorized access outside the uploads folder.
- WordPress Plugin Check (PCP) Compliant: Built to the highest WordPress coding and security standards using
WP_Filesystemand corewp_delete_file().
Legal Disclaimer
CRUSHEDGE ORPHANED UPLOAD CLEANER IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS, OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, LOSS OF DATA, WEBSITE DOWNTIME, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FILE DELETIONS ARE PERMANENT AND IRREVERSIBLE. Always create and verify a complete backup of your WordPress database and wp-content/uploads/ directory before performing any cleanup or deletion operations.