How To Add A New Admin User To Your WordPress Site Through FTP


images 4 300x138 - How To Add A New Admin User To Your Wordpress Site Through FTP

Hello to all our readers. Today am making this post on how to Add a new Admin User to your WordPress site through FTP account.

How do you feel if you are locked out from your own WordPress Dashboard ?
I know you will be worried and frustrated. Yea,Same thing happened to me and I was able to fix it with this method. So if such happen to you never panic because you are on a safe side.

How To Add New Admin User To Your WordPress Site Through FTP

First you need to login to your FTP Account.
Once login, you need to locate your WordPress current theme, open it and locate the <b>functions.php file</b>.
It would be at a location like this:

Click on functions.php file and then select download. Your FTP client will download the functions.php file to your computer Or you can still edit online if you can .

Open the file you just downloaded on your computer using a plain text editor like Notepad. Now you need to add this code at the bottom of the file.

$user = ‘Username’ ;
$pass = ‘Password’ ;
$email =‘ ;
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’ ,’wpb_admin_account’ );

Don’t forget to replace Username, Password, and with your own values.

Next, save the file and then upload it back to your website using the FTP client.

You are now done !!you can now visit your WordPress site’s login area and sign in with the user account you just added.

Once you have logged in to your WordPress site, please edit the functions.php file and delete the code you added . Deleting the code will not remove the user you added.

Don’t understand any Part. Feel free to comment and your comment will be reply immediately.


Hope you find this article helpful, Like and Share.

Get PlazaNG from the Amazon Appstore.
Show More

Related Articles

Leave a Reply

55 thoughts on “How To Add A New Admin User To Your WordPress Site Through FTP”

Leave a Reply

Your email address will not be published.

error: Content is protected!! Contact Head Admin For More Information