Unused Media Scan & Delete WordPress Plugin

The Simplest Way to Delete Unused Media from WordPress

Unused Media Scan & Delete logo

The WordPress Media Library is a folder in your WordPress website, where all your uploaded media files are stored. It can hold ANY type of content file (more on that further down).

It can (and should) be organised by installing an ‘image categorisation plugin’, so files can be grouped/managed much more easily. (The one we use is Happyfiles for all our websites).

Regardless, over time, unused uploads still amass and sit on the server, taking up hosting space.

The problem escalates if you re-design websites for clients, or take-on WordPress sites developed elsewhere. There’s always a collection of unused media littered throughout the Media Library.

Most of them are unused images, because WordPress duplicates every image you upload, into multiple size versions.

We needed a simple and fast way of cleaning all of that out, so we built one.

What does Unused Media Scan & Delete do?

The Unused Media Scan & Delete WordPress Plugin scans your WordPress Media Library and highlight all the assets that are not currently being used.

Then select which ones you wish to remove by ticking them and bulk deleting them.

Why use Unused Media Scan & Delete on your WordPress site?

  • Firstly, this is a problem that we encounter in all the websites we build or manage. There wasn’t a simple fix for it, until now.
  • Similar functionality exists in other plugins, but they are all bloated with extra features we don’t need and would never use. Right now, there isn’t anything as streamlined and efficient as Unused Media Scanner for tackling this issue.
  • It’s lightweight-by-design because PageSpeed is so essential to SEO. We made it as clean and efficient as possible, and we’ll continue to ensure it remains bloat-free.
  • We developed it as an internal tool for 1WL Agency’s Web Development & Content teams, because we needed this feature and could not find it.  Using someone else’s plugin would have been SOOO much easier than building it ourselves!
  • This is something we use regularly on all the sites we support and develop, so we wanted to share this with the WordPress Community and hope others find it equally useful.
  • The current version is completely FREE to use. Download Unused Media Scan & Delete here!

What is the future development path for Unused Media Scan & Delete?

Our plan is to add additional functionality as we find new requirements that align/compliment the existing functionality. We don’t have anything confirmed yet but when we do, we will update this page with the details of any new features.

We are also open to suggestions for any features you might like to see. Contact Us if you have any.

What file types does Unused Media Scan & Delete work with?

Unused Media Scan & Delete works with any file type. It simply scans through every single file in the WordPress Image Library, and lists it in the scan results.

It detects image files including JPG, PNG, GIF, SVG, WEBP and more. It is able to display thumbnails for most image file types too.

It also detects video files including MP4, MOV, WMV, AVI, MKV, WEBM and more.

And if you have downloadable documents in your site, it will detect those too. E.g DOCX, PDF, XLSX, PPTX and more.

There are no limits on what it will detect. If you have uploaded it, Unused Media Scan & Delete will find and list it.

Changelog

= 1.0.1 =

– Added localisation, in order to support additional languages in future. Currently just exists in English
– Added a link to a Help page
– Updated the design of the image results to feel more like the Media Library
– Separated Unused Image Scanner results into individual tabs for Unused Images and Used Images

= 1.0.2 =

– Updates to comply with WordPress plugin guidelines

= 1.0.3 =

– Further updates to comply with WordPress plugin guidelines

= 1.0.4 =

– Further updates to comply with WordPress plugin guidelines

= 1.0.5 =

– Further updates to comply with WordPress plugin guidelines

= 1.0.6 =

– Updated to support WordPress 6.6

= 1.0.7 =

– Change of plugin name from Unused Media Scanner, to Unused Media Scan & Delete. Added a ‘Select All’ option for selecting items to delete from the results list.

Disclaimer and recommendation:

As with all plugins, the safest way to use them is to test them on a non-live copy of the website before using them on a Live site, and in addition, make a complete backup of both your WordPress database and all Website Files, before you begin (in case you delete something you later find you needed).

Use of this plugin is done so entirely at your own risk. As the plugin developer, we do not accept any responsibility for your use of this plugin, or any loss of assets that might arise from using it.

Follow the recommendations, always have a backup, and you’ll always be fine.

How to use Unused Media Scan & Delete:

1) Install the plugin, then find the Unused Media Scan & Delete in the Tools menu. Click on it.

2) Click the “Run library scan” button on the Scanner tab and wait for the list of results.

3) To remove images, click one or more checkboxes (or choose ‘select all’) and click “Delete selected”.

4) Wait until a confirmation alert box appears before closing your browser tab/window or navigating away.

Once complete, check your website thoroughly to ensure everything functions as it should.

The Results page explained

As shown above in Step 3 above, the results of a scan are split across 2 tabs for Unused Results and Used Results, with a slight difference to the information between them.

Both results tabs show the following generic information:

  • ID – The unique database ID for the media file
  • URL – The URL path to the image or file (append this to your domain name to view the file in your browser)
  • URL Bare – This is the unique slug assigned to the file, by WordPress.

 

The Used Results (below) also contains a ‘References’ table containing the following additional information:

  • ID – The unique database ID for the Page or Page Revision
  • Type – Whether the file is currently being used in a Page, or in a past Revision of a page.
  • Title – This is the title of the page or revision.
  • Edit – This is a link to Edit the page or View the revision of the page, where the file is in use.

NOTE: When a file is in use on more than one page, each of those pages and all their revisions will appear in the list.