WP Manifestindependent plugin directory
manifest / performance / wp-upload-cleaner

WP Upload Cleaner

Find and safely remove orphaned files from wp-content/uploads. Preview in admin or run via WP-CLI.

by Best Website · github.com/bestwebsite-legacy/wp-upload-cleaner

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/bestwebsite-legacy/wp-upload-cleaner/archive/refs/heads/master.zip

WP Upload Cleaner — scan and clean unused media files safely

WP Upload Cleaner

Find and safely remove orphaned files from wp-content/uploads.

When sites are migrated, rebuilt, or heavily edited over time, the uploads folder collects files that are no longer referenced by any media attachment. This plugin scans for those orphaned files, lets you preview them in the dashboard, and delete safely — or automate via WP‑CLI.

Features

  • Scan uploads/ for files not referenced by any attachment
  • Preview results in Tools → Upload Cleaner
  • Delete selected files or Delete All from the last scan
  • WP‑CLI: scan, delete_all, delete <path>
  • Safety checks ensure deletions stay inside the uploads directory

Installation

  1. Upload wp-upload-cleaner to /wp-content/plugins/
  2. Activate via Plugins
  3. Go to Tools → Upload Cleaner

WP‑CLI

wp upload-cleaner scan --format=table
wp upload-cleaner delete_all --yes
wp upload-cleaner delete 2025/01/old-image.jpg

Author

Built and maintained by Best Websitehttps://bestwebsite.com
Contact: support@bestwebsite.com

License

GPL‑2.0 or later