What type of hash does WordPress use for passwords?

If you look in to your WordPress database, you absolutely do not know what type of hash does WordPress use. You can find in users table passwords like this $P$BSs8sw1A8XAYtypu9qlldf0bviemIu1. As you see, this is not typical MD5 hash.

We have a word: wordpress
In MD5 hash: 1870a829d9bc69abf500eca6f00241fe
In WordPress hash: $P$BXb4SCf11vB9pPFJFbkDLzDqVq89ra/

The WordPress password hasher implements the Portable PHP password hashing framework. WordPress used MD5 in the older versions.

You can generate hashes using WordPress encryption scheme at WordPress password hasher: http://scriptserver.mainframe8.com/wordpress_password_hasher.php.

WordPress has the password encryption library located in /wp-includes/class-phpass.php. It is the Portable PHP Password hashing framework.

How to hash password by WordPress hash?

function wordpress_hash_password( $password ) {
 require_once( '/path/to/wp-includes/class-phpass.php' );
 $wp_hasher = new PasswordHash( 8, TRUE );
 $hashed_password = $wp_hasher->HashPassword( $password );
 return $hashed_password;
}

Recent Articles

How to bulk delete WordPress comments in PHPMyAdmin

Any user working on the computer system has the option in quickly deleting all the WordPress comments by using MySQL or phpMyAdmin....

Removing unwanted p and br tags from WordPress

When working with HTML, you sometimes don’t like your HTML editors because of the irritating automatic bugs. Yes, we are here with...

The 7 Best WordPress Plugins For Google Analytics 2020

As the saying goes, "what is not measured, is not managed." After setting up a WordPress website, it’s important to see what’s...

How to hide all WordPress update notifications in dashboard

When working on a project, it can be frustrating to have to deal with all the update notifications that are in the...

How to add custom HTML to wp_nav_menu

WordPress has a lot of features that help us solve almost all daily tasks of any programmer or web developer. Due to...

Get in touch

Be our first-class reader, build a community and follow us on social media!

Leave A Reply

Please enter your comment!
Please enter your name here