12

A site has thousands of images in the uploads folder. ISP has threatened to shut it down because it is about to exceed server limits for the max number of files in one directory.

I looked at the Settings > Media panel and there is the unchecked option "Organize my uploads into month- and year-based folders"

If I check this, what will happen to the existing images in the uploads directory (will they be re-organized?)

If not, can someone recommend a way/plugin to refile them in the new structure? I'd like to tidy up.

thank you

7
  • 2
    They stay where they were uploaded, thus preserving existing links to them in your post/page content.
    – webaware
    Jan 15, 2013 at 1:22
  • Thanks for the answer! I'd still like to know about any recommended method of reorganizing thousands of images in the uploads directory.
    – Tapefreak
    Jan 15, 2013 at 1:41
  • As far as reorganizing the media files, I am thinking about doing that myself. I will let you know if I ever put something together. It is a low priority and I am sure it is not for the faint of heart. :)
    – s_ha_dum
    Jan 15, 2013 at 2:05
  • Unfortunately, there doesn't seem to be a way to change the uploads structure from one directory to many, and have the attachments still...attached. I think @s_ha_dum is going to face an uphill battle - but those are the most satisfying when you reach the goal. :)
    – akTed
    Jan 15, 2013 at 2:28
  • 1
    @AKTed, I am sure it is doable. I've moved a site from a really terrible home grown ASP/MSSQL kinda-CMS to WordPress. This can be done. It is going to take a lot of database processing... if I ever decide to move on it at all :)
    – s_ha_dum
    Jan 15, 2013 at 5:01

1 Answer 1

8

If I check this, what will happen to the existing images in the uploads directory (will they be re-organized?)

No. The old structure is preserved and new files are added to the chosen new structure

If not, can someone recommend a way/plugin to refile them in the new structure? I'd like to tidy up.

The problem you will run into with reorganizing them is that links to the files in posts and pages will not update if you are simply moving stuff around the server. An integrated solution is required. While there are plugins that purport to do file management that should help (or at least make this slightly less painful) I tend to think your best plan of attack would be to think through what kind of organization you need and for whom. Given your scenario above, it should be easy enough to placate the ISP by moving a chunk of files to a new subfolder and doing a database-level search and replace (or attempt to use the file management plugin linked above) and just keep things organized going forward. Depending on your setup and budget, you might also want to think about sending new uploads to S3 or other offsite storage option...

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.