Title: wp_is_large_network
Published: April 25, 2014
Last modified: February 24, 2026

---

# wp_is_large_network( string $using, int|null $network_id = null ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#wp--skip-link--target)

Determines whether or not we have a large network.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#description)󠁿

The default criteria for a large network is either more than 10,000 users or more
than 10,000 sites.
Plugins can alter this criteria using the [‘wp_is_large_network’](https://developer.wordpress.org/reference/hooks/wp_is_large_network/)
filter.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#parameters)󠁿

 `$using`stringrequired

`'sites'` or `'users'`. Default is `'sites'`.

`$network_id`int|nulloptional

ID of the network. Default is the current network.

Default:`null`

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#return)󠁿

 bool True if the network meets the criteria for large. False otherwise.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#source)󠁿

    ```php
    function wp_is_large_network( $using = 'sites', $network_id = null ) {
    	$network_id = (int) $network_id;
    	if ( ! $network_id ) {
    		$network_id = get_current_network_id();
    	}

    	if ( 'users' === $using ) {
    		$count = get_user_count( $network_id );

    		$is_large_network = wp_is_large_user_count( $network_id );

    		/**
    		 * Filters whether the network is considered large.
    		 *
    		 * @since 3.3.0
    		 * @since 4.8.0 The `$network_id` parameter has been added.
    		 *
    		 * @param bool   $is_large_network Whether the network has more than 10000 users or sites.
    		 * @param string $component        The component to count. Accepts 'users', or 'sites'.
    		 * @param int    $count            The count of items for the component.
    		 * @param int    $network_id       The ID of the network being checked.
    		 */
    		return apply_filters( 'wp_is_large_network', $is_large_network, 'users', $count, $network_id );
    	}

    	$count = get_blog_count( $network_id );

    	/** This filter is documented in wp-includes/ms-functions.php */
    	return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count, $network_id );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/ms-functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/ms-functions.php#L2707)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/ms-functions.php#L2707-L2736)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#hooks)󠁿

 [apply_filters( ‘wp_is_large_network’, bool $is_large_network, string $component, int $count, int $network_id )](https://developer.wordpress.org/reference/hooks/wp_is_large_network/)

Filters whether the network is considered large.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_is_large_user_count()](https://developer.wordpress.org/reference/functions/wp_is_large_user_count/)`wp-includes/user.php` |

Determines whether the site has a large number of users.

  | 
| [get_current_network_id()](https://developer.wordpress.org/reference/functions/get_current_network_id/)`wp-includes/load.php` |

Retrieves the current network ID.

  | 
| [get_user_count()](https://developer.wordpress.org/reference/functions/get_user_count/)`wp-includes/user.php` |

Returns the number of active users in your installation.

  | 
| [get_blog_count()](https://developer.wordpress.org/reference/functions/get_blog_count/)`wp-includes/ms-functions.php` |

Gets the number of active sites on the installation.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#)

| Used by | Description | 
| [WP_MS_Users_List_Table::prepare_items()](https://developer.wordpress.org/reference/classes/wp_ms_users_list_table/prepare_items/)`wp-admin/includes/class-wp-ms-users-list-table.php` |  | 
| [WP_MS_Sites_List_Table::prepare_items()](https://developer.wordpress.org/reference/classes/wp_ms_sites_list_table/prepare_items/)`wp-admin/includes/class-wp-ms-sites-list-table.php` |

Prepares the list of sites for display.

  | 
| [wp_ajax_autocomplete_user()](https://developer.wordpress.org/reference/functions/wp_ajax_autocomplete_user/)`wp-admin/includes/ajax-actions.php` |

Handles user autocomplete via AJAX.

  | 
| [WP_User_Query::prepare_query()](https://developer.wordpress.org/reference/classes/wp_user_query/prepare_query/)`wp-includes/class-wp-user-query.php` |

Prepares the query variables.

  | 
| [wp_get_sites()](https://developer.wordpress.org/reference/functions/wp_get_sites/)`wp-includes/ms-deprecated.php` |

Return an array of sites for a network or networks.

  | 
| [wp_maybe_update_network_site_counts()](https://developer.wordpress.org/reference/functions/wp_maybe_update_network_site_counts/)`wp-includes/ms-functions.php` |

Updates the count of sites for the current network.

  | 
| [wp_maybe_update_network_user_counts()](https://developer.wordpress.org/reference/functions/wp_maybe_update_network_user_counts/)`wp-includes/ms-functions.php` |

Updates the network-wide users count.

  |

[Show 2 more](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.8.0](https://developer.wordpress.org/reference/since/4.8.0/) | The `$network_id` parameter has been added. | 
| [3.3.0](https://developer.wordpress.org/reference/since/3.3.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 3 content](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#comment-content-2387)
 2.    [Rami Yushuvaev](https://profiles.wordpress.org/ramiy/)  [  9 years ago  ](https://developer.wordpress.org/reference/functions/wp_is_large_network/#comment-2387)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_large_network%2F%23comment-2387)
     Vote results for this note: 2[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_large_network%2F%23comment-2387)
 4.  Whether the network has more than 5,000 users/sites instead of 10,000:
 5.      ```php
         function custom_large_network( $is_large_network, $component, $count, $network_id ) {
             return ( $count > 5000);
         }
         add_filter( 'wp_is_large_network', 'custom_large_network', 10, 4 );
         ```
     
 6.  Source: [https://generatewp.com/snippet/9XaNVan/](https://generatewp.com/snippet/9XaNVan/)
 7.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_large_network%2F%3Freplytocom%3D2387%23feedback-editor-2387)
 8.   [Skip to note 4 content](https://developer.wordpress.org/reference/functions/wp_is_large_network/?output_format=md#comment-content-2386)
 9.    [Rami Yushuvaev](https://profiles.wordpress.org/ramiy/)  [  9 years ago  ](https://developer.wordpress.org/reference/functions/wp_is_large_network/#comment-2386)
 10. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_large_network%2F%23comment-2386)
     Vote results for this note: -2[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_large_network%2F%23comment-2386)
 11. Whether the network has more than 5,000 users/sites instead of 10,000:
 12.     ```php
         function custom_large_network( $is_large_network, $component, $count, $network_id ) {
         	return 5;
         }
         add_filter( 'wp_is_large_network', 'custom_large_network', 10, 4 );
         ```
     
 13. Source: [https://generatewp.com/snippet/9XaNVan/](https://generatewp.com/snippet/9XaNVan/)
 14.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_large_network%2F%3Freplytocom%3D2386%23feedback-editor-2386)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_large_network%2F)
before being able to contribute a note or feedback.