Can anyone guide me in the right direction on how to loosen or disable the strong password policy?
Would like to do it without the use of a plugin.
I'm running a non-public site and don't need strong security.
-
1There is no "strong password policy" in wordpress– Mark KaplunJan 30, 2016 at 14:41
-
4Well, you cannot make a simple password, it will only accept very strong passwords, when you create an account as a user. Maybe "policy" is not the right word. make.wordpress.org/core/2015/07/28/passwords-strong-by-default– MrCalvinJan 30, 2016 at 22:01
-
1It's not when creating the admin account or creating user-account in the backend. It's when a user creates his own account in the frontend. In my case using the e-commerce plugin WooCoomerce. But as far I can read this strong password policy is a WP core feature, not delivered by the plugin. But I find it VERY restrictive and I want to disable it or loosen it. I've added a screen-dump to my question.– MrCalvinJan 31, 2016 at 23:25
-
1it's a WP core service. They implemented the library called "zxcvbn", made by Dropbox in 2012.– MrCalvinFeb 2, 2016 at 8:31
-
3I already did....but I have more faith in wordpress.stackexchange ;-)– MrCalvinFeb 3, 2016 at 9:30
4 Answers
This will do it :-)
add_action( 'wp_print_scripts', 'DisableStrongPW', 100 );
function DisableStrongPW() {
if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) {
wp_dequeue_script( 'wc-password-strength-meter' );
}
}
I found the solution here.
-
This did not work for me. I even tried changing it to
'password-strength-meter'
– FlimmMay 29, 2019 at 17:21
Currently it's not possible to change the strength requirements of the password. You can only deactivate it the functionality completely by dequeueing the password script:
add_action( 'wp_print_scripts', 'DisableStrongPW', 100 );
function DisableStrongPW() {
if ( wp_script_is( 'user-profile', 'enqueued' ) ) {
wp_dequeue_script( 'user-profile' );
}
}
For changing the minimum strength of the password I can recommend this plugin which builds on the same library and integrates nicely into woocommerce: https://wordpress.org/plugins/wc-password-strength-settings/
Just to update this answer:
add_action( 'wp_print_scripts', 'DisableStrongPW', 100 );
function DisableStrongPW() {
if ( wp_script_is( 'user-profile', 'enqueued' ) ) {
wp_dequeue_script( 'user-profile' );
}
}
-
Did anything change? New WP version? Haven't played with WP for some time now.– MrCalvinJun 22, 2019 at 11:24
It can also be set in the wp_generate_password function. Just in case you use it for your own code. See: https://codex.wordpress.org/Function_Reference/wp_generate_password
-
This only changes the default suggested password, it doesn't change the minimum strength required of the chosen password.– FlimmMay 29, 2019 at 17:21