Function: populate_network

populate_network( integer $network_id, string $domain, string $email, string $site_name, string $path, boolean $subdomain_install )

Populate network settings.


Name Type(s) Default Value Description
$network_id integer 1

ID of network to populate.

$domain string ''

The domain name for the network (eg. "").

$email string ''

Email address for the network administrator.

$site_name string ''

The name of the network.

$path string '/'

Optional. The path to append to the network's domain name. Default '/'.

$subdomain_install boolean false

Optional. Whether the network is a subdomain installation or a subdirectory installation. Default false, meaning the network is a subdirectory installation.


boolean | WP_Error

True on success, or WP_Error on warning (with the installation otherwise successful, so the error code must be checked) or failure.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.