Log In Register
Search
Home » Blogger, Wordpress » How To Add A New Admin User To Your WordPress Site Through FTP
Posted by ,

Blogger, Wordpress

 

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:
/yoursite.com/wp-content/themes/your-current-theme/functions.php

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.

function
wpb_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’ ,’wpb_admin_account’ );

Don’t forget to replace Username, Password, and email@domain.com 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.

Also Read:  Top 5 bad seo mistakes 

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.

Related Post
  1. Top Secret Of Getting Approve From Google Adsense

Comment Area

Login or an account to have access to all features of PlazaNG. It takes you less than 2 minutes and you have lots of advantages as a full user of PlazaNG.
Log In Register

Leave a Reply

Leave a Reply

Your email address will not be published.

Topics

Blogroll

Ads By Google