Skip to content

bestwebsite/wp-upload-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WP Upload Cleaner — scan and clean unused media files safely

WP Upload Cleaner

Latest release License: GPL-2.0+ WP-CLI Maintained by Best Website

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

About

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

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages