0% found this document useful (0 votes)
264 views

DB User Creation

Normally you will not need to do this unless you have somehow removed your Admin User Irom your database. But iI you ever do need to add an Admin User to your Wordpress Database through phpMyAdmin this is how you would do it.

Uploaded by

Rui Figueiredo
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
264 views

DB User Creation

Normally you will not need to do this unless you have somehow removed your Admin User Irom your database. But iI you ever do need to add an Admin User to your Wordpress Database through phpMyAdmin this is how you would do it.

Uploaded by

Rui Figueiredo
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

phone: 541.582.8154 email: solutionsdnawebagency.

com
why dna?
what we do
our work
blog / news
Home
Contact
Client Login
Support
Home Blog / News News +RZWR$GGDQ$GPLQ8VHUWRWKH:RUGSUHVV'DWDEDVH
+RZWR$GGDQ$GPLQ8VHUWRWKH:RUGSUHVV'DWDEDVH
+RZWR$GGDQ$GPLQ8VHUWRWKH:RUGSUHVV'DWDEDVH
This post will cover how to add an Amin User to your Wordpress database. Generally you will not need to do this unless you
have somehow removed your Admin user Irom your database. Usually you will need to just reset your Admin User`s
password. But iI you ever do need to add an admin user to Wordpress through phpMyAdmin this is how you would do it.
First things Iirst, you will need to log into phpMyAdmin and locate your Wordpress database. II you do not know your
username, password, or even the name oI your database you can Iind it in your wp-conIig.php Iile. This inIormation is Iound
between lines 18 and 26 oI the wp-conIig.php Iile. They look like this:
/** The name of the database for WordPress */
define('DB_NAME', 'yourdb_wp');
/** MySQL database username */
define('DB_USER', 'youruser');
/** MySQL database password */
define('DB_PASSWORD', 'yourpassword');
Select your database Irom the database select menu in phpMyAdmin. Your database will be loaded and you will now see a list
oI your database tables. You will need to change the ZSBXVHUV and the ZSBXVHUPHWD table. Click on the wpusers table to
bring up the data Ior that table. You should see a list oI the current users come up or iI you do not have any users you will see
the list oI database Iields available.
(GLWLQJWKHZSBXVHUVWDEOH
Click on the table you want to view
Click on the Insert tab
We will need to insert a row into the database with our admin users inIormation. Click on the ",QVHUW" tab in order to bring up
the phpMyAdmin insert Iorm. Insert the Iollowing inIormation:
1. XVHUBORJLQ this is the username you want to use to access Wordpress
Page 1 oI 11 How to Add an Admin User to the Wordpress Database , DNA Web Agency
18-06-2012 http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
2. user_pass this is the password you want to use to access Wordpress (be sure to select MD5 Irom the phpMyAdmin
Function menu Wordpress stores passwords with MD5 encryption)
3. user_nicename put whatever you would like to reIer to yourselI as in here (not your username)
4. user_email this is the email account associated with this user
5. user_url the url to your website like http://www.dnawebagency.com
6. user_registered when was this user registered just select a date with the date selector
7. user_activation_key you can leave this blank
8. user_status leave this set to 0
9. display_name usually I set this to whatever my usernicename is
Ok now that you have got all oI that inIormation entered you will need to hit the "Go" button at the bottom oI the
phpMyAdmin window. You should be redirected to a page that shows the results oI your query. II there are no errors continue
with editing the wp_usermeta table.
Editing the wp_usermeta table
So now that we have inserted our user we will need to give it privileges to access the Wordpress Admin seciton. This is done
through the wp_usermeta table. You will need to know the id oI the user you just created. II you don`t know the id now would
be a good time to check the wp_users table Ior it. We will need to insert two rows into the wp_usermeta table,
wp_capabilities and wp_user_level. Here are the steps you will need to Iollow to give your user privileges.
1. Click on the wp_usermeta table to bring up the entries.
2. Click on the "Insert" tab to insert a new row.
3. Fill in the Iollowing inIormation
1. umeta_id - leave this blank it is automatically generated
2. user_id this is the id oI the user you created in the previous steps
3. meta_key Ior this step insert wp_capabilities
4. meta_value insert exactly this a:1:{s:13:"administrator";b:1;}
4. Insert another row with this inIormation
1. umeta_id - leave this blank it is automatically generated
2. user_id this is the id oI the user you created in the previous steps
3. meta_key Ior this step insert wp_user_level
4. meta_value insert 10
5. Click the "Go" button in phpMyAdmin to insert the row.
Now you should be able to login to your wp-admin page with the username and password you speciIied Ior this user. AIter
logged in I would visit the Users section within Wordpress, click edit on the user I just added, and click the Update Profile
button at the bottom oI the screen. This will allow Wordpress to go through and add some more inIormation and "clean up" the
user we just added.
That`s it iI you have issues visit our support page to learn how to receive support.
Tags: WordPress Website Design
56 Comments
1.
Great post. Short and inIormative.
HopeIully it`s not too oIten you have to do this, but I was just conIronted with this situation, and, not having done it
beIore, knowing the values to insert into the metakey and metavalue Iields was priceless. Thank you.
Comment bv Tobv December 18, 2009 4.49 pm
2.
Glad we could help Toby. Remember to store that inIo now!
Comment bv :ach December 18, 2009 4.56 pm
3.
I got into this situation due to rebuilding my amember database integrated with wordpress. broke my head Ior more than
8 hours beIore I got this clue..thanks a lot and a great inIormation.
Page 2 oI 11 How to Add an Admin User to the Wordpress Database , DNA Web Agency
18-06-2012 http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
Comment bv Jinnie Rvan Januarv 20, 2010 6.28 am
4.
Also, iI you need to add someone as editor, insert the Iollowing in replacement oI the administrator comment:
a:1:s:6:editor;b:1;}
Comment bv Zack Februarv 11, 2010 11.15 pm
5. |...| the original post here: How to Add an Admin User to the Wordpress Database , DNA Web Agency Tags: mysql, |...|
Pingback bv wp-popular.com Blog Archive How to Add an Admin User to the Wordpress Database [ DNA Web
Agencv Februarv 18, 2010 9.41 pm
6.
great inIo and very helpIul
Comment bv sds drill bits March 18, 2010 2.18 pm
7. |...| to the comments Ior this post? Big hugs and kisses out to DNA Web Agency Ior this uber-helpIul inIormation liIted
Ior this tutorial. |...|
Pingback bv Manuallv Adding an Admin to WordPress Database Recovering Lost WP Admin Passwords April 13,
2010 12.03 pm
8.
thanks mate this was amazingly helpIul, thanks allot, i was trying to maka a wp user Irom some other application
interIace and Iollowed two steps in php coding 1) MD5( $pass )
2) setting wpcapabilities and wpuserlevel like you said.
Thanks!
Comment bv arpit tiwari Mav 12, 2010 12.43 am
9.
Thanks, I have FTP access so I built a script. In WPMU add 1
metakey` ~ wp1capabilities`,
metavalue` ~ a:1:s:13:administrator;b:1;}`
metakey` ~ wp1userlevel`,
metavalue` ~ 10'
Regards.-
NomikOS.-
Comment bv NomikOS June 1, 2010 11.10 pm
10.
Hi! I just wanted to say your site is one oI the nicely laid out, most inspirational I`ve come across in quite a while. Thx!
Comment bv Sandra June 15, 2010 10.42 pm
11.
i owe you a lot.
been looking Ior a way to solve my problem. took me almost an hour. thanks Ior this tutorial. i had to create a new
admin. i just wonder how my admin status changed to subscriber. i checked on the other users via phpmyadmin and
they`re all subscribers.
Page 3 oI 11 How to Add an Admin User to the Wordpress Database , DNA Web Agency
18-06-2012 http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
but again, i owe you a lot.
Comment bv enad June 23, 2010 6.53 am
12.
Great article, thank you Ior putting it together its just helped massively!
Comment bv Nick Julv 30, 2010 5.46 am
13.
I had someone hack into my database and change my admin inIo and remove it`s admin privileges and I had no idea
what was going on.
This Iinally helped me get back into my wordpress install as an admin.
Thanks a ton!
Joe
Comment bv Joe Laverv August 1, 2010 12.05 am
14.
Thank you. You helped me ALOT with this article.
Estani
Comment bv Estanislao August 2, 2010 7.08 am
15.
Hi Iolks,
I have a problem. I used the method you describe above at http://www.dnawebagency.com/how-to-add-an-admin-user-to
-the-wordpress-database to create a new admin user (all the user tables were erased when I imported the wordpress
backup, so no admin user) so I created a subscriber then there were user tables.
So then I used your method twice to create two diIIerent admin users (the php my admin sees them both as
administrators when I browse them) but when I login I get 'You do not have suIIicient permissions to access this
page. ???
Where do I go next and what is the problem. My new host is GoDaddy and they have just lately come to the wordpress
table. Ha ha I made a Iunny.
Okay, the site is paciIictribune.com. Can you help me to add-an-admin-user-to-the-wordpress-database?
Aloha,
John Shklov
Comment bv fohn shklov August 4, 2010 9.45 pm
16.
UnIortunately this didn`t solve my problem. I am moving my WP 3.0.1 install Irom one server to another, and it`s not
going too well. The blog is there, seems to be okay, but I cannot post a post, it`s looking like I`m not admin, even though
I`m logged in as an administrator. And I just Iollowed this process to create a new admin, and that new admin is not
letting me post either. *sigh*
Comment bv Cvnthia August 25, 2010 2.46 pm
17.
Worked perIectly thanks!
I have a site I`m helping to develop, but they didn`t want to give me admin access. Only Full FTP and SQL haha.
Page 4 oI 11 How to Add an Admin User to the Wordpress Database , DNA Web Agency
18-06-2012 http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
Comment bv Abeon August 29, 2010 4.50 am
18.
Thanks so much Ior this inIo!
For anyone who Iinds they`re unable to log in right away, go through the lost password` procedure and reset your
password. This worked Ior me, and I was able to log in and set my password back again. It`s possible the most recent
WP installation uses a higher encryption than MD5.
Comment bv Rick September 19, 2010 11.49 pm
19.
Thank you so much Ior a great inIormative article you saved me a lot oI headaches with this excellent quick Iix!
Bill
Comment bv Bill September 25, 2010 3.19 pm
20.
Thanks Ior sharing LiIesaver.
Comment bv David Lockie October 12, 2010 1.49 pm
21.
Thanks Ior this, it`s been a big help.
Comment bv Simon October 18, 2010 11.33 pm
22.
This was very well layed out, Iollowed directions all was added, however still did not give me admin privs and I can not
Iind my wp conIigure Iile, my site has been severly hacked and they stole my admin privs and I am not able to get the
Iile etc. and have limited knowledge. Would appreciate any help, even my 'web designer is suggesting I start over.
Comment bv Jordana October 30, 2010 9.53 am
23.
Nice, to the point and most importantly correct! Thanks Ior sharing
Comment bv Michael Quillinan November 3, 2010 12.29 pm
24.
Thanks a lot DNAWEBAGENCY. This post very helpIul. My client blog has been hack. They hack the index.php. They
also delete the user. What i need to do is create new user and Iollow all your tutorial above using phpmyadmin.
Damn hackers!
Cheers mate, you rocks!
Comment bv Baloot November 13, 2010 12.51 am
25. $GGLQJD:RUG3UHVVDGPLQDFFRXQWWRWKHGDWDEDVH
I recently had a situation where the admin account on a WordPress installed site got removed or merged into another
user account. Obviously WordPress doesn`t allow you to create new admin accounts outside the CMS so I was stuck and
locked out Iro.
Trackback bv BedroomPublishing.com November 15, 2010 1.11 am
Page 5 oI 11 How to Add an Admin User to the Wordpress Database , DNA Web Agency
18-06-2012 http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
26.
Thanks!Thanks!Thanks! I had a lot oI problems and now I solved them.
Comment bv i4ever November 17, 2010 1.57 pm
27. |...| Cum sa adaugi un nou admin -aici 2.Manualul de utilizare wordpress 3. Forum wordpress.org 4.String Iunctions
aici 5. Recover |...|
Pingback bv Tutoriale utile November 17, 2010 3.17 pm
28.
Thanks, very helpIul.
One quick note: II you`ve named your database tables with a preIix other than 'wp you`ll need to edit the above
accordingly. And I`ve read that it`s more secure iI you do change that deIault preIix to something else.
This happens in the wp-conIig.php Iile:
**
* WordPress Database Table preIix.
*
* You can have multiple installations in one database iI you give each a unique
* preIix. Only numbers, letters, and underscores please!
*
$tablepreIix yourpreIixhere`;
Comment bv Jim December 2, 2010 9.55 am
29.
I didn`t have access to phpMyAdmin. I was able to get it done using mysql command line. Thanks Ior posting.
Comment bv Pius Ekhaevemhe December 2, 2010 2.12 pm
30.
John Shklov, iI you have an error that says 'You do not have suIIicient permissions to access this page, you may
want to check your preIix in wpcapabilities row in wpusermeta table. You must use the wordpress table preIix when
adding the wpcapablities row. Ex. iI your wordpress users table is wpgusers, you must use wpgcapabilities when
adding that row to your usermeta table.
Comment bv Pius Ekhaevemhe December 2, 2010 4.25 pm
31. |...| http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database This entry was posted in
Wordpress and tagged admin, mysql, phpMyAdmin. Bookmark the permalink. Iind events assosiated with elements
|...|
Pingback bv Adding admin user from phpMvAdmin [ mindeater.com web builder December 2, 2010 6.58 pm
32. |...| A way to avoid that is to create a new admin user that is diIIerent Irom your original one (click here Ior the
instructions on how to do that). AIter you Iinish this task, you have to log out oI your |...|
Pingback bv ToffsvHeart.com Wordpress Securitv Tips (or how to stop those Wordpress hackers) December 7, 2010
5.21 pm
33.
Great instructions. I`m writing a short article on Wordpress and one oI the things I just wanted to do is to write a simple
instruction on how to add an admin to your Wordpress account, but it seems you have done the work Ior me, so I`ll just
send my readers here. Thanks
Comment bv Toffsv Heart December 7, 2010 6.10 pm
Page 6 oI 11 How to Add an Admin User to the Wordpress Database , DNA Web Agency
18-06-2012 http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
34.
Thanks! I`m back in.
Maybe helpIul Ior others: iI you didn`t use the deIault table preIix (`wp`), change the instructions above accordingly.
So, wpcapabilities becomes yourpreIixcapabilities and wpuserlevel should be yourpreIixuserlevel
Comment bv Edde December 30, 2010 10.21 am
35.
Thanks Ior this inIormative article. Now I can Iix my problem. thanks a lot Ior sharing..!
Comment bv alex Januarv 14, 2011 6.18 pm
36.
Thanks a lot
Saved my day. Special thnx goes to Gooooogle and to this precious page.
Comment bv Muggo Januarv 19, 2011 6.57 am
37.
thank you so much Ior this post, my blog was crashed Ior a good couple oI days as I worked day and night to Iigure it
out. yours was one oI three posts I Iound that, combined, helped me Iix it. wonderIul.
Comment bv austin s. Februarv 3, 2011 9.38 pm
38.
Outstanding! Thanks!
Comment bv JJ Februarv 11, 2011 10.19 am
39.
Had a client site get hacked and this tutorial is spot on. Thanks Ior the help!
Comment bv nickhempsev March 1, 2011 11.19 am
40.
Hi
Thanks so much Ior this article.
I had issue with my WP blog admin user was not Iound so I had access to DB, Iiles but not WP admin.
I created new user admin1 just like you described above and gain access to blog.
AIter that i simply deleted corrupted admin and created new admin
Works!
Thanks!
Comment bv Dmitri March 5, 2011 5.36 am
41.
Just what I was looking Ior! Someone hacked one oI my sites, and made me a subscriber. Could not see how to Iix
this. Someone sent me this link, and it solved my problem! Thank you so much!!!!
Comment bv Diana March 5, 2011 11.54 pm
42.
Page 7 oI 11 How to Add an Admin User to the Wordpress Database , DNA Web Agency
18-06-2012 http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
thanks you should be #1 on the google SERPs! worked like a charm
Comment bv Neil Cowlev March 8, 2011 9.44 am
43.
Hey, thanks very much Ior posting this! You guys saved me a bunch oI time by enabling me to do these steps. I really
appreciate it.
regards,
Charlie
Comment bv Charlie April 17, 2011 1.31 pm
44. |...| cool thing I Iound was a way to add WordPress users Ior site directly through MySql
http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database. I need to get this migration done
and tested. It`s keeping me Irom working on revenue generating |...|
Pingback bv Wealth Strategies Journal Dav Five Wealth Strategies Mav 4, 2011 8.59 pm
45.
Never leave comments.BUT this one saved my a$$ big time..YEAH BOIIIII
Comment bv NYCKIDD Mav 9, 2011 11.39 am
46. |...| Iirst user so I decided to add another one, this time a real admin. I Iollowed the advice at the dna web agency on
account oI with a name like that, how could they not be trustworthy? Well, outside oI some |...|
Pingback bv The Endless Login Acta Monasteri Mav 15, 2011 12.48 pm
47.
Thanks! This inIo saved me today. For some reason, my Wishlist plugin wreaked havoc and removed my admin user
when someone registered Ior a course I`m hosting on my Wordpress site.
LiIe saver!
Cheers,
Tia
Comment bv Tia Mav 20, 2011 1.22 pm
48.
Nice article.
Once visit http://www.wordpressstop.com to get lot oI stuII regarding to Wordpress.
Comment bv Prasad Mav 28, 2011 5.45 am
49.
many thanks buddy
Comment bv Reddv June 17, 2011 12.34 pm
50.
I`d been working on this issue Ior a couple oI hours when I Iinally Iind this. Total liIesaver! Thanks much Ior creating it!
Comment bv Tara June 23, 2011 3.39 am
Page 8 oI 11 How to Add an Admin User to the Wordpress Database , DNA Web Agency
18-06-2012 http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
51.
Cheers Ior this. Needed to add myselI as admin aIter I lost my email details. Phew!
Comment bv PCO Licence June 28, 2011 9.09 am
52.
You`re welcome. Glad it helped, it`s saved us a Iew times!
Comment bv :ach June 29, 2011 9.43 am
53.
Oh.. Great post. This helped me to login into my client wordpress blog with admin power.
Thank you so much.
Comment bv Libin J Babu August 1, 2011 12.15 am
54.
Thanks it worked! I wanted to make a new admin, just because my Iirst one dont cope with my comments. It`s suppose
to say that i am the admin in the commentsection but still, it doesn`t. I guess i have another problem..
Comment bv Caroline August 22, 2011 7.15 am
55.
Hi, I Iollow the instructions, when I logged in, the Iollowing message came up: You do not have suIIicient permissions
to access this page.
How do I Iix this.
Your help is deeply appreciated.
Many thanks.
Comment bv Sui Anukka August 27, 2011 1.09 pm
56.
Great post! I knew there would be a way to do it. Thanks!
Comment bv Rob September 30, 2011 5.37 am
RSS Ieed Ior comments on this post. TrackBack URL
/HDYHDFRPPHQW
Name (required)
Mail (will not be published) (required)
Website
Submit Comment
Page 9 oI 11 How to Add an Admin User to the Wordpress Database , DNA Web Agency
18-06-2012 http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
Previous
Next
Search Ior: 6HDUFK
Latest Posts
Hackers have you scared? Protect your website.
TomsBroncoParts.com New Site, Better Results
Displaying New Products in Magento with Pagination
Maddie's Adventures - WordPress Website Blog
BeIore & AIter: NomadsLand WordPress Website Design
BeIore & AIter: Mycorrhizal WordPress Website Design
Changing the Look oI the Magento Store Switcher/Selector
BeIore & AIter: Waterstone WordPress Website Design
Moving the Magento Store Switcher / Selector
WordCamp SF Here We Come!
Internet Marketing
Target Local Business with Google Local
Website vs. Web Site - Which one is right?
Biztech Day in San Francisco
How to choose a website developer?
News
Hackers have you scared? Protect your website.
WordCamp SF Here We Come!
DNA Web Agency is in MedIord, Oregon
DNA Website Featured on www.welovewp.com
How to Add an Admin User to the Wordpress Database
Social Media: How To Create A Facebook URL For Pages
WordPress Wins Overall Best CMS 2009 Award
DNA Launches a New Website
DNA Web Agency Joins the Twitter Conversation
DNA Sponsors Friends & Family RooI Giveaway
Recent Projects
TomsBroncoParts.com New Site, Better Results
Maddie's Adventures - WordPress Website Blog
BeIore & AIter: NomadsLand WordPress Website Design
BeIore & AIter: Mycorrhizal WordPress Website Design
BeIore & AIter: Waterstone WordPress Website Design
Magento e commerce development: Steahly OIIroad
WordPress Website Design: All Current Electric, Inc
Batzer Website Design Gets a Complete Revamp
Spraykings goes with Magento e commerce
Solise.com Website Launches
Web Hosting / Email
Hackers have you scared? Protect your website.
We're Cutting Down on Spam
Web Programming
Displaying New Products in Magento with Pagination
Changing the Look oI the Magento Store Switcher/Selector
Moving the Magento Store Switcher / Selector
The Ternary Operator: Usage and Examples
InIo: Newsletter Signup
Estimate: Request a Proposal
Social Networks: Bookmark & Share
why dna?
About Us
Our Process
Partners
what we do
Web Site Development
Internet Marketing
Design Services
Hosted Web Services
Page 10 oI 11 How to Add an Admin User to the Wordpress Database , DNA Web Agency
18-06-2012 http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
our work
blog / news
DNA Web Agency Tag Cloud:
BeIore and AIter Website DesignContent ManagementEcommerceEmail NewsletterFacebookFlash AnimationIdentity DesignInternet
MarketingKeyword ResearchLogo DesignMagento Ecommerce DevelopmentphpPrint Branding DesignprogrammingRecent ProjectsSEOSlogan
DevelopmentSMMSocial Media MarketingSocial NetworkingSponsorTwitterWeb Development Web DesignWebsite DesignWebsite
HostingWebsite vs. Web SiteWordPress Website Design
2000 - 2012 DNA Web Agency
A MedIord, Oregon Based Website Design and Web Development Agency Iocusing on Magento Ecommerce Development
and WordPress Website Design
Physical Address: 2040 Milligan Way, MedIord, OR 97504 , Mailing Address: PO Box 2009, Rogue River, OR 97537
Phone: 1.541.582.8154 , Email: solutionsdnawebagency.com
Directions To Our oIIice , Powered by WordPress
Expand
nextprevious
Close
Previous
0/0
Next
Page 11 oI 11 How to Add an Admin User to the Wordpress Database , DNA Web Agency
18-06-2012 http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database

You might also like