
Warning:
Always back up your database before making manual changes via phpMyAdmin. Mistakes here can affect your entire site.
Step-by-Step Process to Add an Admin User in phpMyAdmin.
🔹 Step 1: Open phpMyAdmin
- Log in to your hosting control panel (e.g., cPanel, Plesk).
- Locate and click on the phpMyAdmin icon.
- In phpMyAdmin, select your WordPress database from the left sidebar.
🔹 Step 2: Locate the wp_users Table
- Look for the table named wp_users (your prefix may vary, like wp123_users).
- Click on the Insert tab at the top of the page.
🔹 Step 3: Insert a New User Record
- Fill the fields as follows:
📌 Important: Choose MD5 from the function dropdown for the user_pass field.
Click Go to save the user.
🔹 Step 4: Get the User ID
- Return to the wp_users table.
- Note the ID of the user you just created (e.g., 12).
🔹 Step 5: Assign Admin Role via wp_usermeta
- Open the wp_usermeta table.
- Click the Insert tab twice to create two new rows.
First Row:
Field | Value |
---|---|
umeta_id | Leave blank |
user_id | Use the ID from the user you created (e.g., 12) |
meta_key | wp_capabilities |
meta_value | a:1:{s:13:"administrator";b:1;} |
Second Row:
Field | Value |
---|---|
umeta_id | Leave blank |
user_id | Same ID (e.g., 12) |
meta_key | wp_user_level |
meta_value | 10 |
✅ Done!
- You can now log in to your WordPress admin panel with the new credentials:
- Login URL: https://yourwebsite.com/wp-admin
- Username: newadmin
- Password: admin123 (or whatever you set)
You’ve successfully created a new WordPress admin user via phpMyAdmin!