Maintenance checklist
Clean a WordPress media library without guessing
Cleanup is a recovery problem before it is a storage problem. Know what each file does, prove a small removal, and keep a rollback path.

The five-step checklist
Create a restorable backup
Back up both the database and uploads directory. Verify where the backup lives and how you would restore it.
Name the file types
Separate uploaded originals, WordPress thumbnail sizes, edited copies, and generated WebP or AVIF sidecars before selecting anything.
Start with a small sample
Choose representative pages and a handful of media items. Do not begin with the entire uploads directory.
Check every delivery layer
Inspect the front end, Media Library, responsive image variants, cache or CDN, and any page builder that stores image references.
Keep a rollback window
Do not discard the backup immediately. Leave enough time to find less obvious uses such as archives, email templates, or social previews.
Files that need different decisions
- Original uploads: retain unless an explicit archival policy replaces them.
- WordPress thumbnails: regenerate only after checking theme and plugin size registrations.
- WebP and AVIF sidecars: remove through the tool that created them so metadata and files stay aligned.
- Apparently unused media: verify page builders, custom fields, CSS, product galleries, and external references first.