Last active
December 14, 2016 13:51
-
-
Save vovadocent/87f3e1bd55acc03c16aaf70e1f9e5251 to your computer and use it in GitHub Desktop.
Create new admin user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$userdata = array( | |
'user_login' => 'dev_admin', | |
'user_url' => "", | |
'user_pass' => "UkfNb23s54k-j", | |
'role ' => "administrator" | |
); | |
$user_id = wp_insert_user( $userdata ); | |
$user = new WP_User($user_id); | |
$user->set_role('administrator'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment