Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create wordpress password hash generator using php? [closed]

I want to create WordPress password hash using PHP like www.passwordtool.hu.

An example:

Password: admin321

Wordpress Password Hash: $1$8HmCMIeg$qv9z585yftJa2Hxqo7/RB/

For testing purpose here is the tool Online Password Generator Tool: http://www.passwordtool.hu/wordpress-password-hash-generator-v3-v4

How to create this WordPress password using wordpress default functions?

like image 870
Muyin Avatar asked Jun 10 '26 00:06

Muyin


1 Answers

Wordpress provides a default function wp_hash_password();

Example:

$password = 'admin';
$hash_password = wp_hash_password($password);
echo $hash_password;

To work this in PHP just load wp-load.php, So that you can use default wordpress functions.

Wordpress actually use Portable PHP password hashing framework. WP has this included in /wp-includes/class-phpass.php

like image 200
Sudharshan Nair Avatar answered Jun 13 '26 08:06

Sudharshan Nair



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!