Skip to content
mybox Help Center

Help sections

  • Getting Started
  • Account & Billing
  • Domains & DNS
  • Hosting & Servers
  • Email
  • Security & SSL
  • WordPress & CMS
  • Grow Online
mybox.com All services operational
/

Language

  • English
  • Română
  • mybox panel
  • Webmail
Start free
/
  • Getting Started
  • Account & Billing
  • Domains & DNS
  • Hosting & Servers
  • Email
  • Security & SSL
  • WordPress & CMS
  • Grow Online
  • Help Center
  • mybox.com
  • English
  • Română
All services operational Start free
  1. Help Center
  2. Security & SSL
  3. Account & Password Security
How-to Security & SSL

How to Add a WordPress Administrator Through the Database

Updated June 3, 2026 2 min read
On this page
  1. Step 1: Access the Database
  2. Step 2: Open the Users Table
  3. Step 3: Create the New User
  4. Step 4: Grant Administrator Permissions
  5. What to Expect
  6. Summary

If you cannot access the WordPress administration panel, you can create a new administrator account directly in the website’s database. This method can be useful when the existing administrator account is unavailable or when access to the WordPress backend has been lost.

Before proceeding, make sure you have access to the website’s database through phpMyAdmin.

Step 1: Access the Database

Log in to phpMyAdmin from the mybox Panel or by using a direct phpMyAdmin login link.

Use the database credentials assigned to your website during installation.

If you need to reset the database user’s password, update the credentials in the wp-config.php file afterward. Otherwise, WordPress will no longer be able to connect to the database.

Step 2: Open the Users Table

In phpMyAdmin, select your WordPress database from the left-hand menu.

Locate the table ending with _users.

Open the table and note the ID of the most recently created user account. The new administrator account should use the next available ID number.

In the example below, the last user has ID 1, so the new administrator will use ID 2.

Click Insert at the top of the page.

Step 3: Create the New User

Complete the following fields:

Field Value
ID Next available ID number
user_login Username used for login
user_pass Password for the new account
user_nicename Display name or author slug
user_email User’s email address
user_status 0
display_name Name displayed in WordPress

For the user_pass field, select MD5 from the dropdown menu on the left. This allows WordPress to correctly process the password during the first login.

After completing the fields, click Execute.

Step 4: Grant Administrator Permissions

Open the table ending with _usermeta.

Click Insert.

Enter the following values:

Field Value
user_id ID assigned in the previous step
meta_key wp_capabilities
meta_value a:1:{s:13:”administrator”;b:1;}

Click Execute.

While still in the _usermeta table, click Insert again and enter:

Field Value
user_id ID assigned in the previous step
meta_key wp_user_level
meta_value 10

Click Execute to save the record.

What to Expect

Once both entries have been added to the _usermeta table, the new account will have administrator privileges.

You should now be able to log in to the WordPress administration panel using the username and password created in the previous steps.

Summary

WordPress stores user accounts and permissions separately in the database. Creating a new record in the _users table and assigning administrator permissions through the _usermeta table allows you to regain access to the WordPress administration panel without modifying existing accounts.

Was this article helpful?

Didn't find an answer?

Our support team is here for you 24/7 – write to us and we will help you sort it out.

Helpdesk 24/7 Open a ticket in the mybox panel mybox panel Log in and manage your services

On this page

  1. Step 1: Access the Database
  2. Step 2: Open the Users Table
  3. Step 3: Create the New User
  4. Step 4: Grant Administrator Permissions
  5. What to Expect
  6. Summary

Related articles

All in Account & Password Security
How-to Account & Password Security FTP client – How to take care of security? When using FTP clients to manage your website files, it is important to follow security best practices to protect your hosting account… 2 min read How-to Account & Login Management How do I set up 2FA in the mybox panel? Two-factor authentication (2FA) adds a second verification step when logging in to the mybox panel. After entering your password, the panel asks… 1 min read How-to WebMail mail.mybox.com How do I set up two-step verification in Webmail? Security is a priority today, and two-step verification, which requires not only knowing and providing a password, but also a one-time code,… 2 min read
mybox

Modular web hosting – free out of the box, modular to grow.

Help sections

  • Getting Started
  • Account & Billing
  • Domains & DNS
  • Hosting & Servers
  • Email
  • Security & SSL
  • WordPress & CMS
  • Grow Online

mybox

  • mybox.com
  • mybox panel
  • Webmail
  • Helpdesk 24/7
© 2026 mybox 1,680 articles