You can create a new WordPress admin user from within the database. Use this method if your original admin user was corrupted or removed.
- Sign in to phpMyAdmin.
- In phpMyAdmin, in the left-side menu, select the name of the database your site uses.
- From the left-side menu, look for the users table and select that table (select the text, not the checkbox). For example, this table might be called wp_users in your menu.
- From the top menu, select Insert.
- In the Value column, enter the following:
Field What it is… ID Any number that isn’t already used by another user. user_login Username for accessing the WordPress dashboard. user_pass Password for this user.
Note: Make sure to select MD5 in the Functions menu.user_nicename The nickname for this user. user_email Email address for this user. user_registered The date and time this user was registered. user_status Set this to 0. display_name Name that will display for this user.
- On the right, select Go.
- From the left-side menu, look for the usermeta table and select that table (select the text, not the checkbox). For example, this table might be called wp_usermeta in your menu.
- From the top menu, select Insert.
- In theΒ ValueΒ column, enter the following:
Field What it is… user_id Enter the ID from step 4. meta_key Enter wp_capabilities. Note: For Managed WordPress accounts or custom database table prefixes, replace wp_ with the correct prefix (such as coolPrefix_capabilities). meta_value Enter the following: a:1:{s:13:”administrator”;s:1:”1″;}
- Select Go.
- Select the Insert tab again.
- In the Value column, enter the following:
Field What it is… user_id Enter the ID from step 4. meta_key Enter wp_user_level. Note: For Managed WordPress accounts or custom database table prefixes, replace wp_ with the correct prefix (such as coolPrefix_user_level). meta_value Enter number 10.
- Select Go.
You can now sign in to WordPress with your new username and password.
More Info
- Here’s what to do if you’re unable to sign in to WordPress.
- https://domains.solveforce.com/