wp_install( string $blog_title, string $user_name, string $user_email, bool $is_public, string $deprecated = '', string $user_password = '', string $language = '' )
Installs the site.
Description
Runs the required functions to set up and populate the database, including primary admin user and initial options.
Parameters
- $blog_title
-
(Required) Site title.
- $user_name
-
(Required) User's username.
- $user_email
-
(Required) User's email.
- $is_public
-
(Required) Whether the site is public.
- $deprecated
-
(Optional) Not used.
Default value: ''
- $user_password
-
(Optional) User's chosen password. Default empty (random password).
Default value: ''
- $language
-
(Optional) Language chosen.
Default value: ''
Return
(array) Data for the newly installed site.<br>
- 'url'
(string) The URL of the site.<br> - 'user_id'
(int) The ID of the site owner.<br> - 'password'
(string) The password of the site owner, if their user account didn't already exist.<br> - 'password_message'
(string) The explanatory message regarding the password.<br>
Source
File: wp-admin/includes/upgrade.php
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |