Terminal: How to Change a WordPress User Password via MySQL (User: coic)

πŸ” How to Change WordPress Admin Password via MySQL (User: coip)

Last updated: July 3, 2025

🧰 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.

πŸ“Œ Tip: Always backup your database before performing manual operations.

 

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *