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