WP Manifestindependent plugin directory
manifest / security / wp-php-password

WP PHP Password

Basic Replacement for WordPress Built in Passwords forked from Roots Password Bcrypt

★ 2stars
13release downloads
1.0.0latest · 2 years ago

Install

Download wp-php-password.zip From the 1.0.0 release on GitHub, Feb 3, 2024

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/timnashcouk/wp-php-password/releases/download/1.0.0/wp-php-password.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

[!CAUTION] WordPress since 6.8 has supported Bcrypt and extended support for Argon password, this repo remains active as it is being used by folks using ClassicPress and non 6.x.x branch.

Basic Replacement for WordPress Built in Passwords forked from Roots Password Bcrypt

This plugin replaces the default Password hasher PHPass used by WordPress with native PHP hashing functions allowing it to take advantage of improved algorithms like Bcrypt and Argon2.

This plugin is based on the roots original but also provides a few quality of life improvements over the Roots version which hasn't had much love in a while.

Primarily:

  • Wrapped in function_exists which means it will work with PHPStan and static analysis tools
  • Supports more then just Bcrypt for example can be extended to support Argon2

Installation

Install manually into mu-plugins folder

If installed as a regular plugin, may not run properly if another plugin is overriding password features.

Switching to Argon

function my_password_algo( $algo ){
    return PASSWORD_ARGON2ID;
}
add_filter( 'wp_php_hash_password_algorithm', 'my_password_algo' );

Your version of PHP must be compiled with argon2 support for the above to work. Also if you make use of WP-CLI then make sure the CLI version of PHP is also compiled with Argon.

You might also want to make use of wp_hash_password_options filter to provide some alternative options:

function my_password_options( $options ){
    $supports = [
        'memory_cost' => 2048, 
        'time_cost' => 4, 
        'threads' => 3
    ];
    return $supports;
}
add_filter( 'wp_hash_password_options', 'my_password_options');

Changelog

See CHANGELOG.md for notable changes per version.

Releases

1 release. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
1.0.0 latest
Feb 3, 2024 2 years ago
wp-php-password.zip
13