1

I have a cron job that alerts me to modified files on a couple of WordPress installs. Two of them alerted me tonight to the creation of apparently empty folders like

/home/foo/public_html/wp-content/uploads/2013/05

Is there a scheduled job in WordPress to create the next month's upload directory on the last day of a month?

2
  • 1
    I think these are created by user interaction and not automatically.
    – NW Tech
    May 1, 2013 at 6:15
  • That's what I thought too. May 1, 2013 at 14:53

1 Answer 1

2

I believe by default these folders are created by user interaction, however, it's possible that a plugin may be calling a function to create these monthly upload folders.

Note that using this function will create a subfolder in your Uploads folder corresponding to the queried month (or current month, if no $time argument is provided), if that folder is not already there. You don't have to upload anything in order for this folder to be created.

That's according to the the Codex > Function Reference > wp_upload_dir(). Maybe you could get more detailed logs to determine how they're created...I'm not real familiar with server administration.

1
  • 2
    +1, likely the reason. wp_upload_dir() can be used by many things to get information about paths and it does create those folders to have valid paths for current date.
    – Rarst
    May 1, 2013 at 17:37

Your Answer

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

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