W3cubDocs

/WordPress

get_sitestats()

Gets the network’s site and user counts.

Return

(int[]) Site and user count for the network.

  • 'blogs'
    (int) Number of sites on the network.
  • 'users'
    (int) Number of users on the network.

Source

File: wp-includes/ms-functions.php

function get_sitestats() {
	$stats = array(
		'blogs' => get_blog_count(),
		'users' => get_user_count(),
	);

	return $stats;
}

Changelog

Version Description
MU (3.0.0) Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_sitestats