# Storage Used Column in the Network Sites List

> Shows how much upload space each site uses next to its quota in Network Admin > Sites, highlighting sites that are close to the limit.

- Type: PHP
- Runs: Admin only
- Category: [Multisite](https://wpide.com/library/category/multisite/)
- Tags: network-admin, sites, storage, quota
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/ms-sites-storage-column/

## Code

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

$wpide_warn_at = 80; // Highlight sites using more than this percentage of their quota.

add_filter( 'wpmu_blogs_columns', function ( $columns ) {
    $columns['wpide_storage'] = __( 'Storage' );

    return $columns;
} );

add_action( 'manage_sites_custom_column', function ( $column, $blog_id ) use ( $wpide_warn_at ) {
    if ( 'wpide_storage' !== $column ) {
        return;
    }

    switch_to_blog( $blog_id );
    $used    = (float) get_space_used();
    $allowed = (float) get_space_allowed();
    restore_current_blog();

    if ( get_site_option( 'upload_space_check_disabled' ) || $allowed <= 0 ) {
        echo esc_html( size_format( (int) ( $used * MB_IN_BYTES ), 1 ) );
        return;
    }

    $percent = min( 100, round( $used / $allowed * 100 ) );
    $style   = $percent >= $wpide_warn_at ? ' style="color:#b32d2e;font-weight:600"' : '';

    printf(
        '<span%1$s>%2$s / %3$s (%4$d%%)</span>',
        $style, // phpcs:ignore WordPress.Security.EscapeOutput -- static markup.
        esc_html( size_format( (int) ( $used * MB_IN_BYTES ), 1 ) ),
        esc_html( size_format( (int) ( $allowed * MB_IN_BYTES ) ) ),
        (int) $percent
    );
}, 10, 2 );
```

## Notes

Disk usage is computed by WordPress and cached per site; sites with uploads unlimited show only the used size.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Storage Used Column in the Network Sites List" 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/
