W3cubDocs

/WordPress

is_multisite()

If Multisite is enabled.

Return

(bool) True if Multisite is enabled, false otherwise.

More Information

Usage
if ( is_multisite() ) { echo 'Multisite is enabled'; }

Source

File: wp-includes/load.php

function is_multisite() {
	if ( defined( 'MULTISITE' ) ) {
		return MULTISITE;
	}

	if ( defined( 'SUBDOMAIN_INSTALL' ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) ) {
		return true;
	}

	return false;
}

Changelog

Version Description
3.0.0 Introduced.

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