Media Cleaner

Delete unused files from WordPress

Do you run a popular website about WordPress, photography, or do you have another way to talk about my plugin? I can share a free license against some promotion of my plugins. As you might know, I don’t do any marketing, I prefer to focus on quality and support 🙂 If you are interested, contact me

Media Cleaner is a tool that detect unused and useless files from your WordPress. It cleans clean your Media Library and your uploads directory.

WP Media Cleaner

It will check if…

  • the physical file is linked to a media
  • the media is used in a post (post type included)
  • the media is used in a post meta
  • the media is present in a WordPress gallery
  • a retina image is orphan

You can choose to check your Media Library, your uploads directory, or both. For both of them the plugin will check if the file is in use somewhere in your WordPress. If a file is not in use anywhere (from the uploads directory) but is present in the Media Library, then it will not be marked for deletion.

The files detected as unused are added to a specific dashboard where you can choose to trash them. This trash is internal to the plugin and files can be retrieved from it, still through the dashboard. After more testing, you can trash them definitively. Again, this plugin deletes files so be careful. Backup is important!

First, back up all your files. You cannot trust any plugin or any tool to do this automatically. If you are not sure what you are doing, simply do not do it.

The standard version can scan everything but will not let you delete more than one file at once. If the plugin works perfectly for you (by deleting the files one by one) and if you want to delete all the files at once, then you will need to buy the Pro version.

It has been tested with WP Retina 2x, WPML and Multi-site.

I recommend you to use WPEngine or SiteGround. They are both excellent hosting services and work perfectly with all my plugins.