Jump to content

Massive quantity of empty folders in site/assets/files


jordanlev
 Share

Recommended Posts

I've had a site up and running for a few months now, and I just peeked inside the /site/assets/files directory and there are over 27,000 directories in there! Most of them are empty, and my guess is that Processwire is creating a new directory for every "page" in the site. (99% of these "pages" are not for front-end, but rather are data records representing customers/orders/line-items/etc -- but none of these have image or file fields associated with them).

I found this forum post from 2012: https://processwire.com/talk/topic/1585-module-clean-empty-directories-from-siteassetsfiles/ ... where Ryan says that the core was updated (a couple of years ago now) to not create folders for every page, but it seems that it's not happening for me. I'm running version 2.5.3, so it's relatively recent. How do I keep this from happening? Is there a setting somewhere I missed? Or do I need to schedule a cron job to clean out empty folders periodically or something?

Thanks,

Jordan

Link to comment
Share on other sites

Mystery solved: I actually *did* have an image field associated with every template because I had a "meta image" field (for facebook/pinterest shares etc) as a GLOBAL field... so I need to un-global that field and manually go through and assign it to only the pertinent templates. Hopefully then all the empty folders won't be created.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...