-
-
Save arigato-one/fe12347d10e900909c2487be297b5c95 to your computer and use it in GitHub Desktop.
This file contains 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@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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment