最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Loosendisable password policy

programmeradmin5浏览0评论

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.

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.

Share Improve this question edited May 8, 2016 at 17:30 MrCalvin asked Jan 30, 2016 at 14:27 MrCalvinMrCalvin 4292 gold badges5 silver badges12 bronze badges 8
  • 1 There is no "strong password policy" in wordpress – Mark Kaplun Commented Jan 30, 2016 at 14:41
  • 4 Well, 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/core/2015/07/28/passwords-strong-by-default – MrCalvin Commented Jan 30, 2016 at 22:01
  • 1 It'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. – MrCalvin Commented Jan 31, 2016 at 23:25
  • 1 it's a WP core service. They implemented the library called "zxcvbn", made by Dropbox in 2012. – MrCalvin Commented Feb 2, 2016 at 8:31
  • 3 I already did....but I have more faith in wordpress.stackexchange ;-) – MrCalvin Commented Feb 3, 2016 at 9:30
 |  Show 3 more comments

4 Answers 4

Reset to default 13

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.

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/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' );
    }
}

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/Function_Reference/wp_generate_password

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论