By default, WordPress will organise media files, such as images, into folders based on the year and month the file was uploaded. It can potentially cause some issues, as discussed later in this article, so it’s a good idea to consider how you’d like to store your media files before you start building your website.

The setting to control month- and year-based folders are part of the WordPress Administration area and can be disabled if preferred. To remove dates from URLs in your WordPress media file uploads:

  • Go to your WordPress Dashboard.
  • Choose Settings > Media.
  • Disable the checkbox next to Organise my uploads into month- and year-based folders (enabled by default in new WordPress installations).
  • Choose Save Changes.

Why you should remove dates from URLs in your WordPress media uploads, and why you shouldn’t.

From an organisational perspective, it’s logical to organise images and files by content. As an administrator, you can use Media Categories to help organise your media files within the Media Library. WordPress doesn’t offer the ability to carry this organisation through to the URL architecture, mainly because a media item is taggable multiple categories.

Search Engine Optimisation

It’s not so much a case of why you shouldn’t use dates in your URLs, but more a question of why you would. From an SEO perspective, there’s no real benefit to using dates within your URLs. Using them is not necessarily a problem either, but it certainly provides no tangible benefit.

On the other hand, removing dates from URLs provide some minor benefits by making each URL shorter and improving readability. Shorter URLs are considered more favourably for SEO and websites that adopt a good URL architecture with consise and meaningful URLs can do better in terms of attracting traffic. Consider the following URLs for comparison:

As the number of links with extended URLs builds up on your site, it is going to unnecessarily contribute to HTML page size and also influence other factors such as your text-to-HTML ratio, both of which are SEO factors. Even though this is a minor issue, you should always aim to keep your code as concise and efficient as possible across all aspects of your site – the use of dates in media URLs is unnecessary.

Website Performance

If you have a vast site that uses a lot of media, then categorising it into different URLs might have some advantages in some instances.

Every operating system has its limitations and performance degradation based on the number of files that exist in a single directory. More files in a folder mean more time required to locate the correct one. When we’re talking about performance degradation, we’re generally talking about tens of thousands of files per folder – the vast majority of websites don’t deal with this number of records, so performance should not be a consideration for most.

Website Maintenance

One of the main issues we’ve found with dates in URLs is that it can create extra work with static content that forms the core of your website. In particular, logos, default Open Graph images, images injected into email templates, and so on. With date URLs in place, changing one of these images will also result in the URL changing (unless the change is in the same year and month as the original image). You’re going to have to update every system that points to these URLs to keep things intact: and that can be a nuisance.

Getting the best of both worlds

For most websites, categorising media URLs by date offers no benefit, and you can disable this option. If you have a large site with lots of media, or if you prefer to have your media URLs categorised by date, then a hybrid solution can work nicely.

A feature of the Organise my uploads into month- and year-based folders option in WordPress is that the setting only applies to media as it is uploaded. That means media uploaded with the setting disabled will be allocated different URL structures to media with it enabled – and they stay that way. It provides an excellent level of control that allows you to deal with static images, such as logos, differently to other media content.

Our recommendation is to upload commonly used static media with the setting disabled. It ensures that your URL with not be embedded with a date and applies mainly to when you are first building the core aspects of your website. For all other media, you can upload with the setting enabled if you wish.

If there ever comes a time that you need to update your logo, for example, disable the setting again before you upload the replacement file – this ensures that the URL won’t change, assuming that you use the same filename. When finished, enable the setting again.