Blog

WEBFI-WordPress-How to Add an Admin User to the WordPress Database via MySQL



Should you ever get hacked or have a issue with your database there are some things that are useful to know. One powerful tool is the ability to create a new admin user without logging in to your site. In this video, we will show you how to add an admin user to the WordPress database using MySQL.

If you liked this video, then please Like and consider subscribing to our channel for more WordPress videos.

Text version of this tutorial:
http://www.wpbeginner.com/wp-tutorials/how-to-add-an-admin-user-to-the-wordpress-database-via-mysql/

Follow us on Twitter:
http://twitter.com/wpbeginner

Checkout our website for more WordPress Tutorials
http://www.wpbeginner.com/

Summary of this Tutorial:

Start by log gin in to your host’s cpanel

One you log in you will see databases, you may want to back them up before proceeding.

Open the wp_users table and click insert.

Fill in the information and use a md5 password.

With the information filled in click ‘Go’ and it will tell you how many rows were affected with a green check mark.

Next update the wp_usermeta by clicking insert.

Leave the unmeta_id blank

Fill the user_id with the id from before, meta_key will be wp_capabilities, and meta_value will be: a:1:{s:13:”administrator”;s:1:”1″;}

Then fill another row with unmeta_id blank and user_id the one from before.

meta_key will be wp_user_level and meta_value is 10.

Now you will have a new admin user on your site.

Related Links:

How to do a database backup

http://www.wpbeginner.com/beginners-guide/how-to-make-a-wordpress-database-backup-manually/

source

25 Comments

  • Sultan Shaik on January 29, 2015

    Thank you so much… this worked perfectly for me. I have a question, my admin user got deleted from users column by itself. I had nothing to do with it. Thankfully, i created it again using your guide. But why do you think it got deleted in the first place?

  • Gary Hills on February 22, 2015

    you skip through way too much not showing what you are putting in fields. Not very helpful really

  • Gregory Magnuszewski on October 16, 2015

    Omg, es like gosh darn Rocket Science, SloW DowN!

  • Sam Hatch on November 2, 2015

    Hey, Thank you. This helped with memory issues.

  • Internet Marketing Light on December 18, 2015

    a bit fast, had to replay several times to figure out the user ID part but over all GREAT Video!!! Thank You!! 🙂

  • Jonathan Tarrant on April 14, 2016

    This is WPBeginner? Jeez – there is NO explanation of any step and it's at 100 miles an hour.

  • The Tutt1 on April 21, 2016

    did it all the same like in video and tutorial, not working, just made normal account, but not admin account… any solutions?

  • Alex de BCN on July 23, 2016

    I have WordPress 4.5.3 and I am Admin but I can’t manage my users (add or delete or change roles). Why could that be? What can I do? Anyone please help!

  • Joanna Łącka on August 5, 2016

    this is the worst tutorial I've ever seen.. Cuted words.. wrr….

  • Paula Schuler on September 10, 2016

    Thank you! One suggestion, let the screens stay up a little longer. You move through it pretty quickly.

  • MystalurDimensh on September 19, 2016

    Worked like a charm. Thank you!

  • denn denn on February 26, 2017

    America, where there's no such thing as the beginning of a sentence nor the end of a sentence.

  • TeamMoRoCcanFiGhTers on March 20, 2017

    your action is faster than your voice !! this is the worst tutorial I've ever seen

  • Victorene Tamapua on June 27, 2017

    got locked out of my wordpress website..any other way to gain my access instead of using phpmyadmin please really need help here

  • El Torino on July 14, 2017

    I did exactly what it said but it added a normal user not admin

  • Elisabeth Donati on July 29, 2017

    Could you have done this any faster? OMG I couldn't follow any of it.

  • Wilfredo Gutierrez on November 6, 2017

    Thank you!!!

  • José Desgris on January 26, 2018

    Great video. Feel free to learn more about self development and marketing to make more money for your projects in life.

  • Josip Matić on August 23, 2019

    Work perfectly!

  • The Designer Developer on October 10, 2019

    Thank you so much for the tutorial! It helped me a bunch. I used it because the client only sent me credentials to their hosting but not the website and although I can change their password I didn't want to so this saved me!

  • Angela M WorkFlowLounge on November 27, 2019

    OMG … I am a fast learner but this video was useless. I'm experienced in sql but this was so fast that I couldn't even follow it. It's ok to take 3 min to explain something this important

  • Ahmad Wali on January 17, 2020

    I have to slow down the speed to watch it! The person who made the video either stupid or doesn't know how to make video tutorials…

  • Omar Salah on July 12, 2020

    This really saved my life. thank a lo. I was going to use lots of hours of work

  • The Vegan Villainess on July 18, 2020

    Thanks, this helped, for some reason I couldn't access the admin dashboard, however you went through this way too quickly.

  • John T on June 23, 2021

    I love your videos – a little more detail would be appreciated

WhatsApp us
Live Chat

Office hours operation Mon-Sun 8:00 am ET – 4:00 pm ET

To start your Premium WP or Cpanel service, use our domain search engine, if the domain you want is available, contact us by Whats app to activate your project.

The easiest, fastest, and most secure way to communicate with us.
loading
Please enter your domain.
Please verify that you are not a robot.

Terms Privacy

 

 

error: WEBFINET SECURITY IS ON