Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
1  
I think these are created by user interaction and not automatically. –  NW Tech May 1 '13 at 6:15
    
That's what I thought too. –  jerrygarciuh May 1 '13 at 14:53

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
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 '13 at 17:37
    
Thank you guys very much! –  jerrygarciuh May 2 '13 at 2:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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