Function: create_user

create_user( string $username, string $password, string $email )

An alias of wp_create_user().

Parameters

Name Type(s) Default Value Description
$username string

The user's username.

$password string

The user's password.

$email string

The user's email.

Returns

integer

The new user's ID.

WordPress Developer Newsletter

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