This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How to Recover a Lost WordPress Admin Password

Updated on December 8, 2021

4 Min Read
reset wordpress admin password

Due to the higher number of websites using the Signup system, a user forgetting the credentials of his or her account is very common nowadays. In the same way, there is the possibility of forgetting the WordPress admin password. Today, we’ll teach you how you can easily reset WordPress admin password or create a new user with administrator rights if you have hosting access.

So, here we go!
First of all, you need to login to your hosting. We’ll be using Cloudways – A Managed WordPress Hosting as our cloud hosting platform.

Step 1: Log in to Your Hosting

Login to your account. If you’ve not registered yet, you can easily get 3 days trial on DigitalOcean servers with 1-click WordPress installation. Just follow the step by step guide to host WordPress on DigitalOcean.

Cloudways Platform Signup

Step 2: Navigating to Application

Go to your server. And under “Application” tab, click on “Application List”.

Server Management

All your Applications hosted on that server will be listed as below.

Go to your WordPress application by clicking on it. I’ll be using “wp-4.5-php7” in my example.

Step 3: Access Database Manager

Your Access Details will look like the screenshot below. As we want to access the database, you can see “MYSQL ACCESS” details on the right side. Click on “LAUNCH DATABASE MANAGER”.

Access Detail

A new window will be opened containing all your WordPress database tables.

WordPress Database Tables

Step 4: Add New User

Click on “wp_users”.

wp_users

You’ll see the complete structure of “wp_users” table. We’re going to add a new user. So, click on “New Item”.

wp_users table

Now, this is the technical part. Follow the instructions carefully. You’ll see lots of text fields to fill. Let me describe what to write there.

  • ID – Pick a unique number (in our example, we will use number 15).
  • user_login – Insert the username you want to use to access the WordPress Dashboard.
  • user_pass – Add a password for the above username. Make sure to select MD5 in the functions menu.
  • user_nicename – Put a nickname or any appropriate name for this admin user.
  • user_email – Add the email you want to associate with this account.
  • user_url – This would be the URL to your website.
  • user_registered – Select the date/time for when this user is registered.
  • user_activation_key – Leave it blank.
  • user_status – Set this to 0.
  • display_name– Put the name you like to display for this user on the site (it can be your user_nicename value as well).
  • Click on the “Save” Button:

Insert wp_users

You can see, our newly created user is shown here.

Select wp_users

Step 5: Assign Privileges to New User

We’ve successfully added a new user. Now we’re going to add privileges to newly created user “Alex”. This is done through “wp_usermeta” table.
For capabilities, we have to add a new row in “wp_usermeta” table.
From your listed database tables. Open “wp_usermeta” table.

wp_usermeta

You’ll see the complete structure of “wp_usermeta” table. We’re going to add privileges to our new user. So, click on “New Item”.

New Item to wp_usermeta

You’ll see 4 text fields to fill. Let me describe what to write there.

  1. umeta_id – Leave this blank, it is automatically generated.
  2. user_id – This is the ID of the user you created in the previous steps (we used number 15).
  3. meta_key – wp_capabilities
  4. meta_value – a:1:{s:13:”administrator”;b:1;}

wp_usermeta

Once again, we have to add a new row in “wp_usermeta” table. Click on “New Item”. And fill fields as below.

  1. umeta_id – Leave this blank, it is automatically generated.
  2. user_id – this is the id of the user you created in the previous steps (we used number 15).
  3. meta_key – wp_user_level
  4. meta_value – 10

wp_usermeta

Step 6: Logging in With New User Credentials

We’ve successfully added a new user named “Alex” and assigned him “Administrator” rights. Now, we’re going to test it by logging into our site. Visit your WordPress Admin Panel dashboard URL. Write the “username” and “password” of your newly created user.

new user login

You can see, we’ve successfully logged in with new username “Alex”.

New Username

The above method was to manage WordPress users via Database. It’s a bit technical. But, you can also manage users and their roles from WordPress Admin Panel as well. You can follow step by step instructions on How To Add Custom User Roles in WordPress. Did you face any difficulty? Feel free to ask by using the comment section below.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Danish Naseer

Danish Naseer is a WordPress Community Manager at Cloudways. He is passionate about designing, developing, and engaging with people to help them. He also actively participates in the community to share his knowledge. Besides that, he loves to watch documentaries, traveling and spending time with family. You can contact him at [email protected]

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now