👋🏼Welcome to my WP-Host blog where I am excited to share my knowledge and expertise on WordPress hosting and website construction tutorials with you. Let’s connect and learn from each other! You can reach me at info@yrshare.com.
Creating a WordPress administrator account through the database (extremely practical): Some people may encounter situations where they forget their passwords on WordPress websites, or even have website users mistakenly deleted. This can be troublesome because there is no way to retrieve their passwords or log in. WordPress will prompt you that there is no such user. In this case, we can retrieve the password through the database.
Keep sharing wordpress tutorials. One of my customers encountered a strange problem before. After he used a wordpress content reset plugin, the website users were cleared.
In general, if a website forgets a password, it can be retrieved through the database. 【WP-Host/悦然wordpress建站】 has previously shared a corresponding tutorial, which everyone can refer to in the above article. However, this user’s situation is quite unique as their WordPress site username has been completely erased. Therefore, the password recovery method mentioned above is not applicable. Next, I will share with you the real solution – adding a WordPress administrator account through the d
Table of Contents
Step 1: Log in to the database to add users
Log in to the website database and find the field storing the user name of the WordPress website. The default value is [wp_user]. If you modify it, it may be a different name, as shown in the above figure. My demo site has been modified. Then click [Insert].
Enter the account information in the pop-up window, as shown in the figure above, here you need to remember the first line of ID, which will be used later, and then user_pass is the MD password, you can directly use the MD5 password I provided [5d41402abc4b2a76b9719d911017c592] to decrypt it is : [hello]. Finally, click Execute and continue to the next step. Although we have added a user at this time, this user does not have any permissions. He can log in to wordpress, but he cannot see the management background.
Step 2: Add user permissions
Next, we find the [wp_usermeta] field. Because my demo site has modified the prefix of the database table, the field is [wpxx_usermeta]. Click on this field, and then click [Insert] to fill in the information in the above picture. Note here that the second line [user_id] in the above figure needs to be the same as the id filled in the previous step. Then fill in [wpxx_capabilities] in [meta_key], fill in [a:1:{s:13:”administrator”;b:1;}] in [meta_value], and then execute it until the next step.
Also in the [wp_usermeta] field, we click Insert again, fill in [user_id] as [3], [meta_key] as [wpxx_user_level], and [meta_value] fill in [10], and finally click Execute and continue to the next step.
As for the addition of the administrator account, we have completed the addition of the administrator account. Next, we need to log in to the wordpress background with the account we added, and then re-edit the user name, modify the information and password, and then save it.
Summarize
The above is the WordPress tutorial that we shared with you today. Although there may not be many users who encounter this type of situation, it can be very troublesome once encountered. The existing tutorials online are introduced from a programmer’s perspective, which may be difficult for many basic WordPress site users to understand. I hope that the version I’ve shared can be helpful to you.
【WordPress Hosting / 悦然wordpress建站】I am a WordPress hobby from China, and I like to communicate with friends from all over the world to learn WordPress website building and maintenance related knowledge.