Mediawell

Description

Media libraries fill up: images uploaded twice, files nothing uses any more, leftovers from deleted media, and items whose file is gone. Cleaning up by hand is risky, because it is hard to know where a file is used. Mediawell finds all of these, shows exactly where each file is used, and cleans up in a way that can always be undone.

What it finds

  • Unused media: items that no post, page, product, widget, menu, setting or custom field uses, and whose file name appears nowhere in the database.
  • Possibly used: items with no known use whose file name still appears somewhere, for example in a page builder layout or another plugin’s field. Each place is listed.
  • Duplicates: files uploaded more than once (identical files), and pictures that look the same but are different files, for example resized or saved again.
  • Unregistered files: files in the year and month upload folders that no Media Library item owns.
  • Missing files: Media Library items whose file is no longer on the server.

Where it looks

  • Image, gallery, cover, media and text, file, video and audio blocks, the image class WordPress adds, gallery shortcodes, and any address of a file in the uploads folder in any size, in the content of every post type and status.
  • Featured images, WooCommerce product galleries and category images.
  • Advanced Custom Fields image, file and gallery fields, on posts, terms and options pages, including repeaters.
  • The site icon and logo, the theme’s logo, header and background images, and media, text, HTML and block widgets.
  • Everything else, as a safety net: post content and custom fields, settings, term and user fields and comments are searched for each file’s name, so page builders and other plugins are covered too.

Safe clean-up

  • Quarantine first. Files are moved to a protected folder and hidden from the Media Library. Nothing is deleted until you choose “Delete permanently”, or after a number of days you set.
  • Nothing breaks. If a visitor or a page still asks for a quarantined file, Mediawell serves it and marks it as still in use, so you can restore it.
  • One-click restore puts every file back where it was.
  • Checked again before every move: an item that is used, or whose name is found anywhere, is never moved in bulk.
  • Uninstalling puts quarantined files back, so removing the plugin never loses anything.

Merge duplicates

Choose the copy to keep and Mediawell points every use of the other copies at it: blocks, galleries, the image class, addresses (each size to the same size), featured images, product galleries, custom fields, the site icon and logo, theme images and widgets. Addresses inside page builder data and other plugins’ fields are replaced too, without breaking stored data. Each content change is saved as a revision. The merged copies go to the quarantine, and their old addresses redirect to the kept copy. Identical files can be merged in one click; pictures that only look alike are never merged automatically.

In the Media Library

  • A Used in column on the list view.
  • An Unused / Possibly used filter.
  • A Where this is used box on each media item’s edit screen.

WP-CLI

  • wp mediawell scan
  • wp mediawell report <unused|possibly|duplicates|unregistered|missing|quarantine> [--format=table|csv|json|count]

Privacy

Mediawell makes no requests to other sites and sends no data anywhere. All work happens in your own database and uploads folder.

Installation

  1. Install and activate the plugin.
  2. Go to Media > Mediawell and click Scan now.
  3. Review the Unused, Possibly used, Duplicates, Unregistered files and Missing files tabs.

FAQ

Is it safe to clean up the Unused list?

These items have no known use and their file name appears nowhere in the database. They go to the quarantine, not the bin, and anything that still asks for them keeps getting the file while it is flagged for you. Keep them in the quarantine for a while before deleting them for good.

How are duplicates found without guessing?

Identical files have the same SHA-1 fingerprint. Pictures that look alike are compared with a 64-bit picture fingerprint made from a tiny grey copy of each image, so resized or recompressed copies match. Nothing uses AI or an outside service.

Will merging duplicates break my pages?

Every known use is pointed at the kept copy and saved as a revision. Any address that is missed still works, because requests for the merged copy’s files are redirected to the kept copy while it is in the quarantine.

Does serving quarantined files work on every server?

It works when the server passes requests for missing files to WordPress, which is the usual setup for Apache and nginx. On servers that answer missing files themselves, requests for quarantined files show “not found” and are not counted.

Which folders does it check for unregistered files?

Only the year and month folders that WordPress creates (such as uploads/2024/05). Other folders in uploads belong to plugins and themes and are never touched. Copies made by image optimisation plugins next to a known file, such as photo.webp beside photo.jpg, are left alone.

Who can use it?

Editors and Administrators. Each action also checks permission for the exact item: deleting a media item, editing the content that is changed, or editing menus and widgets. Settings need an Administrator.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Mediawell” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Mediawell” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.0

  • First release.