• Is it safe to remove empty month/year media folders?

    I did search on the internet and I didn’t find a clear answer from a trusted source.

    If the answer is yes, is there a way to do it automatically from time to time (like a plugin)?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You can try, but I think WordPress would recreate it. Why do you want to delete them?

    After deactivating Settings > Media > “Organise my uploads into month- and year-based folders” all the empty month (and if so, even year) folders can be deleted without problems. This wont change or mess up existing media library entries or their paths. And after that, no new month- and year-based folders will be created in upcoming months.

    If you want to keep “Organise my uploads into month- and year-based folders” activated, also keep the empty folders.

    Thread Starter joe16

    (@joe16)

    @threadi thank you for your reply. Just from an optimization point of view. Why keeping empty folders on a server?

    @cyrfer thank you for your reply. I want to keep the option “Organise my uploads into month- and year-based folders” activated, as it is better for file access performance. But jut for optimizing, I think that is useless to keep empty folders on the server.

    Why keeping empty folders on a server?

    Why not? They don’t take up any disk space (1 inode at most), they don’t interfere with the view and they don’t pose a security risk.

    Thread Starter joe16

    (@joe16)

    @threadi yes there will be useless inodes. I wouldn’t create an empty month folder automatically. I would create one only when there is an upload.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.