Meow Apps

Media Cleaner: Debug Issues

Navigation Close

Common Issues

First, I would like to say that getting the Pro version will not make everything better. If the free has an issue, the Pro will not fix it. It wouldn’t be fair for me to do that to my users. The Pro version adds interesting options, but it doesn’t mean it works better.

If the plugin freezes or breaks, you will need to check if it is an error or a timeout. There is a big difference between the two: it is either because an error happened (in any plugin, usually a different one), or because the request wasn’t finished by the time allowed by the server.

Timeout (Code 524)

WordPress loads all your plugins, for every single request. If your server is not that powerful, running some SQL queries and checking things on top of loading everything might be difficult for it and then a timeout occurs.

First, try to change the settings of Media Cleaner. Those settings will make the scan quite slow but might help.

It this doesn’t work, you can try to disable a few plugins (only during the time of the scan, of course). Don’t disable your page builder, gallery system, ACF, and this kind of plugin; they might be used by the Cleaner to detect the usage of your images.

You can also avoid that Request Timeout by trying other things (and making your website better too). Please have a look here: How to Debug WordPress (the Infamous Request Timeout).

Error (Code 500)

  1. Check your PHP Error Logs. If you don’t know how it works, have a look here: Where are the PHP Error Logs. Pay attention to the time of the error. 
  2. Disable all the plugins except Media Cleaner, and try again. Does it work better?
  3. Run the scan with the Console Developer Tools (Google Chrome) opened. Have a look here: How to use the Network Tab

Too many entries are detected

Make sure your options are set right. Have a look at your PHP Error Logs. Is there any error? Is it related to the plugin?

Then you might be using a page builder or a specific plugin dealing with images that it is not supported by Media Cleaner (WPML Media for example). Are you using one? Check the Compatibility part of the description of the plugin here. If it’s not on the list, please comment below, as other users might also join the discussion and ask for this feature.

There is the last check you can do by yourself. Enable the Logs option in the plugin settings. Run the scan. At the end, a file will be created with debugging information about the latest scan. Under the Logs option, a link to the log file will be added when this file exists. You can open it, and have a look. In the first section of it, you will find the different media IDs and URLs referenced and grouped. In the second section (Checking Media…), the result of the analysis on each media. This second section looks like this:

Media Cleaner Logs

Basically, the ID or the URL of each media are being matched against the first section.

If nothing helps, and you still think that there is something wrong with Media Cleaner, first, you need to find an example how a file that is used (but detected as not used), and find exactly where and how it is used. For example, The Media 25 (titled “Holidays in Nagasaki”) is used as a background image in my article about Nagasaki, using a page builder called “Beaver Builder”. Those details are important. I will not be able to help you if I don’t know this.

Once you have those details, contact me and share them with me. I will be likely to ask you to replicate the issue on a fresh new install of WordPress (I can give you one), that will make me able to fix it more quickly.

The result of the scan is empty

It means your images might have been used somewhere you didn’t suspect. Look at all your images and find one that you are sure is not used anywhere on your website. Click on it in the Media Library. On the right, there is a little widget called Media Cleaner.

Media Cleaner Usage

It will indicate to your something like: Seems to be used in a gallery, or Seems to be used in a post (and in that case, you will get a link to that post). Does this help you?