wp_initialize_site
wp_initialize_site ( $site_id, $args = array() )
Parameters:- (int|WP_Site) site_id Site ID or object.
- (array) args { Optional. Arguments to modify the initialization behavior. @type int $user_id Required. User ID for the site administrator. @type string $title Site title. Default is 'Site %d' where %d is the site ID. @type array $options Custom option $key => $value pairs to use. Default empty array. @type array $meta Custom site metadata $key => $value pairs to use. Default empty array. }
Returns:- (true|WP_Error) True on success, or error object on failure.
Defined at: - Introduced in WordPress: 5.1.0
- Deprecated in WordPress: —
Description
Runs the initialization routine for a given site.This process includes creating the site's database tables and
populating them with defaults.