wp_install
wp_install ( $blog_title, $user_name, $user_email, $is_public, $deprecated = '', $user_password = '', $language = '' )
Parameters:- (string) blog_title Site title.
- (string) user_name User's username.
- (string) user_email User's email.
- (bool) is_public Whether the site is public.
- (string) deprecated Optional. Not used.
- (string) user_password Optional. User's chosen password. Default empty (random password).
- (string) language Optional. Language chosen. Default empty.
Returns:- (array) { Data for the newly installed site. @type string $url The URL of the site. @type int $user_id The ID of the site owner. @type string $password The password of the site owner, if their user account didn't already exist. @type string $password_message The explanatory message regarding the password. }
Defined at: - Introduced in WordPress: 2.1.0
- Deprecated in WordPress: —
Description
Installs the site.Runs the required functions to set up and populate the database,
including primary admin user and initial options.