Title: The /uploads path structure
Author: WordPress VIP Documentation
Published: September 26, 2023
Last modified: January 1, 2026

---

 1. [VIP File System](https://docs.wpvip.com/vip-file-system/)
 2. The /uploads path structure

#  The /uploads path structure

All of the contents of a WordPress site’s `/wp-content/uploads/` directory are mapped
to the VIP File System. This design provides better security, allows VIP’s CDN to
more easily scale access to a site’s media, and enables the WordPress application
to automatically scale horizontally.

Requests that include zero, one, or two path prefixes before `/wp-content/uploads/`
are all sent to the VIP File System. For example, `/articles/wp-content/uploads/...`
and `/legacy/articles/wp-content/uploads/...` will return the same content as the
equivalent path `/wp-content/uploads/...`.

[Redirects cannot be set](https://docs.wpvip.com/redirects/limitations-for-files/)
for any URLs that include the path structure `/wp-content/uploads/*`.

## Modify the year and month path segments

The default path structure for URLs of files that are uploaded to [a site’s WordPress Media Library](https://wordpress.org/documentation/article/media-library-screen/)
is `/wp-content/uploads/YYYY/MM/`. An uploaded file will have a URL structure similar
to: `https://example.com/wp-content/uploads/2023/09/file.jpg`

This default structure can be overridden with the `pre_option_uploads_use_yearmonth_folders`
filter, added to a theme’s `functions.php` file.

This code example demonstrates omitting the year (`YYYY/`) and month (`MM/`) path
segments from the directory structure for uploaded files:

/themes/example-theme/functions.php

    ```lang-php
    add_filter( 'pre_option_uploads_use_yearmonth_folders', function() { return '0'; }, 9999 );
    ```

After deploying the above code example to an environment, all new files uploaded
to the site’s Media Library will have a URL structure similar to:

 * `/wp-content/uploads/{Filename}` for WordPress single sites and for the main 
   site (ID 1) of a WordPress multisite.
 * `/wp-content/uploads/sites/{Site_ID}/{Filename}` for a network site on a WordPress
   multisite.

The directory structure of all media files that were uploaded _prior_ to adding 
the filter will remain unchanged. Those files will continue to be available at the
default `/wp-content/uploads/YYYY/MM/` structure.

### Additional structures

Other custom directory structures can be applied by combining the `pre_option_uploads_use_yearmonth_folders`
filter with [the `upload_dir` hook](https://developer.wordpress.org/reference/hooks/upload_dir/).

Last updated: January 01, 2026