I'm wondering why WordPress doesn't remove uploads from folder when removed from "Media Library"? I set limit to 5mb on WPMU but even if user removes everything from "Media Library" he can't upload anything new because 5mb limit is still present.

How can I make WPMU remove user uploads when removed from Media Library?


That's a worst case scenario. Please be confirmed first that, you have deleted files permanently. By default the deleted files are meant to stay in trash.

  • Thank you for an answer! Can this be changed? So that when user removes files from "Media Library" the are removed from /uploads/sites/ folder? – Paul Dec 15 '12 at 8:02
  • I don't think it's a problem making trash first, because you have another option to bypass it by clicking directly on "Delete Permanently". Anyways, have a look at this, whether it's helpful or not. – Mayeenul Islam Dec 15 '12 at 9:01
  • Maybe I'm blind but there is no "Trash" in Media Library :) You click "delete permanently" and you no longer see this image anywhere but it is still present in /uploads/ folder. I think I'll have to hook into delete_attachment and delete it manually in such event (unless I find a way to do it in Admin Panel). – Paul Dec 15 '12 at 9:27
  • UPDATE: WP3.5 removes images from Media Library and folder like expected but WP3.5 WPMU doesn't (both when clicked "Delete Permanently"). – Paul Dec 15 '12 at 9:31
  • UPDATE2: When I did multiple tests now WP3.5 WPMU also removes images from /uploads/ folder (like it should). But I clearly see that it didn't work yesterday for some reason. I still see yesterday's image in /uploads/ folder but it is gone from Media Library. Today it works fine :) – Paul Dec 15 '12 at 9:36

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.