To add an admin user to a WordPress site via phpMyAdmin, you would typically follow these steps:
- Log in to your hosting control panel and open phpMyAdmin.
- Select the database your WordPress site uses from the list on the left.
- Once the database is open, look for the
wp_userstable (thewp_prefix may be different if you changed it during installation). - Click the
Inserttab to add a new row to thewp_userstable. - Fill in the required fields:
user_login: The username you want to log in with.user_pass: The user's password. It must be converted to an MD5 hash, which phpMyAdmin can do for you (select “MD5” in the dropdown on the left).user_nicename: A URL-friendly version of the username.user_email: The user's email address.user_status: Set this to0.display_name: The name shown for this user on your website.
- Click the
OKbutton to insert the new user data into thewp_userstable. - Next, you need to give this user admin rights. To do this, go to the
wp_usermetatable and click theInserttab. - You need to add two rows to define the capabilities and user level of the new admin user.
- In the first row:
user_id: The ID of the user you just created in thewp_userstable.meta_key: Should bewp_capabilities(again, thewp_prefix may be different).meta_value: Entera:1:{s:13:"administrator";s:1:"1";}to grant administrator rights.
- In the second row:
user_id: The same user ID as before.meta_key: This should bewp_user_level.meta_value: Set this to10to grant the highest access level.
- In the first row:
- Click the
OKbutton to insert these values.
Once you've done this, you should be able to log in to your WordPress site with the new admin account. Always use a strong password for every admin account to keep your website secure.
Keep in mind that editing the database directly can be risky; a mistake could break your website. Always back up your database before making changes.
Send to friends/colleagues:




















{% endif %}
{% if title and title != "" %}
{{ title }}
{% endif %}
{% if excerpt and excerpt != "" %}