π How to Change WordPress Admin Password via MySQL (User: coip
)
π§° Requirements
- Access to your Linux server (SSH or terminal)
- MySQL root access or database credentials
- WordPress database name:
zzle_wu
π Resetting the Password Using MySQL
Run the following command to reset the password for the user coic
:
mysql -u root -p -e "UPDATE zzle_wu.wp_users SET user_pass = MD5('favour2025') WHERE user_login = 'coip';"
This command uses the MD5
hashing algorithm, which is required by older WordPress versions to store passwords in the database.
β οΈ Security Warning
MD5 is outdated and no longer considered secure. Although WordPress still supports it, newer versions use stronger hashing algorithms like bcrypt
.
After logging in with the new password, it’s recommended to immediately update the password again through the WordPress dashboard or WP-CLI to ensure it’s rehashed securely.
β More Secure Alternative Using WP-CLI
If WP-CLI is available on your server, use this command instead for modern hashing:
wp user update coip --user_pass=favour2025
This is the preferred and more secure method to reset a WordPress password.