We have a large, old site that has long gone without care and attention, leading us to have several thousand media items, stretching back to 2014. While being tasked to clear up old media items, in order to sort out bad backlinks, any plug that touts itself as "clean up" plugins that detect unused images, seem to delete items used in theme files.

Is there anything else for it? Or are we doomed to manually checking?


There is very little reason to do this as disk space is cheap and even if you pay more for backup, the ROI here just do not justify the risk. Mainly the risk is that some media is being accessed from outside of the site, from a place that you have interest in continuing serving it.

If this is still a thing you want to do, the best way to go about it is compare your access log, filtered to the media related url, of the last X moths with the actual files that are in the media directory. The files that are never accessed should be a good candidate for deletion, although it is still better to first search for the relevant urls in the content before deleting anything.

You can probably automate such a thing, although unless you are in a true mess, my gut feeling is that manual labor might be cheaper in such a "one off" thing

  • I can't disagree, it's a massive waste of my time, but the directors have been told by marketing that these backlinks are heavily affecting SEO. Still, i'll have a look at what you've said and see if it helps – Mike Rampling Sep 4 '18 at 13:15
  • if you have links that hurt your SEO, don't the SEO guys know which ones are they? Should be much easier to handle known specific problems than go on a witch hunt – Mark Kaplun Sep 4 '18 at 13:42
  • They do, but we want to clean up and clear those at once. Would that I was allowed to choose how to proceed – Mike Rampling Sep 4 '18 at 14:06
  • the problem with my answer as it is right now is that it assumes that the media is not used, not sure how much it will be applicable to "bad" links. I am not sure how can you guess which media is being crawled by search engines and which is accessed by humans. Mind explodes just thinking about it. – Mark Kaplun Sep 4 '18 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.