Advertisement
Guest User

Untitled

a guest
Mar 1st, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #Create a new user account via FTP:
  2. 1. Open FTP client and connect to your account
  3. 2. Navigate to wp-content/themes
  4. 3. Open the folder of the theme you are using
  5. 4. Search for functions.php file and edit it
  6. 5. Copy and paste the following function:
  7.  
  8. function admin_account(){
  9. $user = 'Username';
  10. $pass = 'Password';
  11. $email = 'email@domain.com';
  12. if ( !username_exists( $user ) && !email_exists( $email ) ) {
  13. $user_id = wp_create_user( $user, $pass, $email );
  14. $user = new WP_User( $user_id );
  15. $user->set_role( 'administrator' );
  16. } }
  17. add_action('init','admin_account');
  18.  
  19. 6. Change username, password and email to something unique
  20. 7. Save changes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement