Network not displaying all sites and users

We have more than 10,000 users and blogs on our wordpress network.

There are 2 problems:

  1. admin blogs listing wp-admin/network/sites.php only displays 1 page, no pagination, not displaying all blogs list, not displaying blogs count.

  2. admin users listing wp-admin/network/users.php only displays 1 page, no pagination, not displaying all users list, displaying users count (10113).

Please advice how can we fix this.

1
1

When WordPress builds such a list, it runs a check against the function wp_is_large_network(). It sets a limit of 10000 for users and sites, and when you hit that limit, expensive database operations aren’t executed anymore.

There are two filters with the same name, so you can change the limit.

Example:

add_filter( 'wp_is_large_network', function( $state, $type, $count ) {

    if ( 'users' === $type )
        return $count > 30000;

    if ( 'sites' === $count )
        return $count > 20000;

    return $state;
}, 10, 3 )

If you just want to turn off that restriction completely, use:

add_filter( 'wp_is_large_network', '__return_false' );

Please make sure that your database can handle that!

Leave a Comment