# Custom Upload Quotas for Individual Sites

> Gives chosen sites a bigger (or smaller) upload quota than the network default, without editing each site in Network Admin.

- Type: PHP
- Runs: Run everywhere
- Category: [Multisite](https://wpide.com/library/category/multisite/)
- Tags: upload-quota, storage, sites
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/ms-per-site-upload-quota/

## Code

```php
if ( ! is_multisite() ) {
    return;
}

$wpide_quotas = array( // Blog ID => quota in MB, e.g. 2 => 1000.
);

add_filter( 'get_space_allowed', function ( $space ) use ( $wpide_quotas ) {
    $id = get_current_blog_id();

    return isset( $wpide_quotas[ $id ] ) ? (int) $wpide_quotas[ $id ] : $space;
} );
```

## Notes

Values are in megabytes. Sites not listed keep the network's "Site upload space" setting.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Custom Upload Quotas for Individual Sites" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
