is_multisite() WordPress Function

The is_multisite() function is used to check if a WordPress site is running as a multisite network. If the site is running as a multisite network, this function will return true. Otherwise, it will return false.

is_multisite() #

If Multisite is enabled.


Return

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


Top ↑

More Information

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

Top ↑

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;
}


Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.