Too many files in Uploads folder
-
I built a site several years ago and made the mistake of turning off the “Organise my uploads into month- and year-based folders” setting. That was courtesy of the Core Teaks plugin, which I used at the time for new setups.
In fairness, there’s no warning next to this setting about how much of a problem this can become on sites that upload a large number of media files. There should be a warning, because this folder is now unmanageable.
The site has grown over the years and there’s now 98,000 images in the Uploads folder. This isn’t helped by the fact that, unbeknown to me, the theme creates 19 (yes, you read correctly, 19) different sizes of the same image with each upload. None of them are being used anywhere, apart from full size, but this has multiplied the number of files in that folder by 19.
I have now re-enabled the month and year setting, but it’s too late. The folder simply can’t be accessed by FTP due to the number of files within it, and even accessing it via the host’s file manager takes ages and I’m unable to archive the folder, the operation simply times out. I’m restricted by the file manager to selecting 1000 files at a time, so even breaking into several archives in unrealistic.
I only discovered this today because the site needs updating, so I created a MySQL dump and then tried to create a dump of the web files, but whenever I try to compress the Uploads folder, it times out.
What can be done? Ideally I’d like to rearrange the folder into years and months and move all images into the right folders without breaking the URLs. All media manager plugins I found simply create “virtual” folders for the backend, without actually moving the source files, which doesn’t help me. The site badly needs updating, but I’m stuck at the export stage because of this crazy Uploads folder.
- The topic ‘Too many files in Uploads folder’ is closed to new replies.