Requires PHP 5.5 or later
This plugin swaps out WordPress core’s password hashing mechanism with PHP 5.5’s
password_hash() and its accompanying functions. By default, PHP uses bcrypt to hash the passwords. If available, this plugin will use modern Argon2 algorithm. The transition will be transparent.
- A password salt will be generated using a Cryptographically Secure Pseudo-Random Number Generator (
- Password hashes are safe from dictionary attacks with rainbow tables or any other precomputed hash lists, because a secure salt is generated for each password.
- The password hashing is iterated multiple times to provide a good resistance against brute-force attacks.
- Password checks are made in a way that it mitigates time-attacks.
- You do not have to reset passwords of all users. Passwords already hashed in the database will be rehashed automatically and transparently the next time the user logs in.
- PHP might come up with newer password hashing algorithms, and they will be automatically supported without having to reset all the passwords.
This plugin was made initially because one of our applications used WordPress for authentication, but we needed to use an external system
to verify the passwords directly from the database too. Since WordPress has its own password hashing algorithm, we decided to make this plugin to address that problem.
With this plugin, passwords generated by both WordPress and other custom applications now use the PHP’s default
password_hash() functions without compromising any of the applications security.
- Installation Instructions
- Upload the plugin files to the
/wp-content/plugins/password-hashdirectory, or install the plugin through the WordPress plugins screen directly.
- Activate the plugin through the ‘Plugins’ screen in WordPress.
- You are all set! There is nothing to configure. All existing users passwords will be rehashed on their next successful login. There is no configuration UI; it just works.
- Upload the plugin files to the
- Why does this plugin require PHP 5.5?
Because the underline functionality is only available since PHP 5.5. There are other open source workarounds, but we
found the effort not worth it. The oldest PHP version officially supported by PHP maintainers is PHP 5.6 as of now, so
if you are using an older version, you are risking your site to potential bugs and security issues. Plugin is fully tested to
work with PHP versions
- Do I have to reset all existing passwords?
Nope! This plugin is smart enough to identify an old password hash, capable to seamlessly validate it using the old algorithm, and update the hash with the new version automatically. Your users wouldn’t notice a thing.
- What happens if I uninstall this plugin?
Technically, password hashing is a one-way operation. This means we cannot undo the effect of this plugin. Your existing users will need to reset their passwords. However, your password hashes will remain safe.
- How do I confirm the new hashing algorithm is in use?
The easiest way would be to check your database from PHPMyAdmin or any other software in its line. Check if the password
hash field in your users table has the format
$2y$10.... Those who have not updated their hashes will have a different
format. However, if the plugin is unable to override the password hashing algorithm from WordPress core, you will see a
notification in your dashboard. If you do not see anything, you are golden.
- PHP 7.2 comes with Argon2 support!
Yes, and that’s good news indeed. This plugin will expose an option for administrators to switch to the new Argon2 algorithm, and also make the transition automatic for all existing and new users.
- How did pirates collaborate before computers?
Pier to pier networking.
Geniality is in simplicity.
It’s Working fine. Thanks…
Contributors & Developers
“PHP Native password hash” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Initial release.