参考地址 https://wordpress.org/documentation/article/reset-your-password/
1、登录数据库,找到users结尾的表,如wp_users
2、使用新密码生成MD5 hash 在线生成工具 https://www.miraclesalad.com/webtools/md5.php
或者通过下面的命令生成
python
import hashlib
m = hashlib.md5()
m.update(b’123′)
m.hexdigest()
‘202cb962ac59075b964b07152d234b70’
On Unix/Linux:
1. Create a file called wp.txt, containing nothing but the new password.
2. tr -d ‘\r\n’ < wp.txt | md5sum | tr -d ‘ -‘
3. rm wp.txt
On Mac OS X:
1. Create a file called wp.txt, containing nothing but the new password. Then enter either of the lines below
2. md5 -q ./wp.txt; rm ./wp.txt (If you want the MD5 hash printed out.)
3. md5 -q ./wp.txt | pbcopy; rm ./wp.txt (If you want the MD5 hash copied to the clipboard.)
3 、修改表
update wp_users set user_pass='md5 hash' where id=1;--改成你的id