Reputation: 335
I have a WordPress site. Suddenly I have noticed that when I am uploading my media files through media library, those files are saving in "uploads/2016/02/" folder though it is November 2016. But when I am creating posts or pages & adding media files, those files are saving in "uploads/2016/11/" folder, which is correct behavior.
N.B.- media setting (Organize my uploads into month- and year-based folders) is checked or enabled.
I have checked the file & directory permissions are ok. I tried with disabling some media related plugin which are installed but nothing worked.
Does anybody have some ideas why media uploader using wrong backdated (Fabruary) folder, how can I solve this issue?
Upvotes: 2
Views: 4317
Reputation: 161
Best solution I have found previously to resolve this error was done accidentally - rename the upload folder, upload an image and rename the folder again.
Why this fixed it, I'm not sure, I assume it has to do with refreshing the path stored in the database, however it worked for me, so at least this can be seen as worth a try.
Upvotes: 0
Reputation: 1916
Well this is expected behavior. By default WordPress store the media files depending of their post date. You can read more about saving images in this ticket.
Using WP 2.8.4, when uploading new media files to a page or post that has already been published, the new file is added in the /UPLOAD_DIR/year/month/ directory that corresponds to the original page/post publication date, rather than the file upload date.
Upvotes: 5