Created
March 1, 2017 20:06
-
-
Save danichim/636917eb44bc534a8bb05c033bf86be0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 protected]'; | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment