0

I am an avid WordPress(.org version) user, and I just got tasked with the job or sorting/deleting 502 items from the Media Library.

I want to find all of the documents (they are PDF, Word, PPT, etc. files) not referenced by a PAGE on the website (post references are fine) and delete them.

Is there any easy way to do this, or will I have to go to a case-by-case basis? If it helps, I have SSH access to the server WordPress is hosted on through FileZilla

Edit: I looked at Media File Cleaner, but it references posts, not pages. Can I edit the plugin in some way to fix this?

1
  • What do you mean by efforts? I looked for support pages, plugins, experimented with the Media Library, though I couldn't find a solution. I'm not very experienced with FileZilla, so I didn't run a script or anything. Dec 27, 2015 at 15:23

1 Answer 1

0

This plugin finds the image files which have not been used within a post or page and displays them for deletion from both your uploads directory and database. Images you have uploaded and used in other area’s of your site will also be displayed. Only problem is it hasn't been updated in a while. WordPress Uploaded Files Cleaner

Once you install and activate this plugin, go to settings to find the link to this page.

enter image description here

Select The Folders You Want To Check For Unused Images

I suggest you analyze one folder at a time rather than select every year.

The reason for this is the plugin does take a while to scan all your uploads depending on how many images in each folder.

Your unused images will then be displayed on the next screen.

You can then move these files from your uploads folder to a dedicated folder.

enter image description here

Move all unused files from your uploads folder to a dedicated folder which can then be deleted or restored.

WordPress Uploaded Files Cleaner on the Wordpress Plugin Directory

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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