Advertisement
kobial8

Create WP Admin in PHP Code

Mar 14th, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1. Step 01: Open functions.php file and write the code anywhere(NO ONE CAN DELETE THIS USER EXCEPT DELETING THE CODE):
  2.  
  3. $admin = new WP_User(wp_create_user('setusername', 'setpassword', 'setemail'));
  4. $admin->set_role('administrator');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement