domain_exists

SummerySummery

Checks whether a site name is already taken.

Syntax

domain_exists( string $domain, string $path, int $network_id = 1 )

DescriptionDescription

The name is the site’s subdomain or the site’s subdirectory path depending on the network settings.

Used during the new site registration process to ensure that each site name is unique.

ParametersParameters

$domain

(string) (Required) The domain to be checked.

$path

(string) (Required) The path to be checked.

$network_id

(int) (Optional) Network ID. Relevant only on multi-network installations.

Default value: 1

ReturnReturn

(int|null) The site ID if the site name exists, null otherwise.

SourceSource

File: wp-includes/ms-functions.php


			

ChangelogChangelog

Changelog
Version Description
MU (3.0.0) Introduced.
Scroll to Top