admin管理员组文章数量:1122832
I have to get following error on the localhost
"code":"application_passwords_disabled"
- Server & Apache: Xampp v3.2.4
- OP: Win 10 64Bit
- WP: v5.6.1
I have to get following error on the localhost
"code":"application_passwords_disabled"
- Server & Apache: Xampp v3.2.4
- OP: Win 10 64Bit
- WP: v5.6.1
3 Answers
Reset to default 16That error could happen if wp_is_application_passwords_available()
returns a false
, and the docs says:
By default, Application Passwords is available to all sites using SSL or to local environments. Use ‘wp_is_application_passwords_available’ to adjust its availability.
So, to enable the Application Passwords:
Enable SSL on your
localhost
,Or define
WP_ENVIRONMENT_TYPE
either as a global system variable or constant, and set its value tolocal
:// Example when defining it as a constant. define( 'WP_ENVIRONMENT_TYPE', 'local' );
Or use the
wp_is_application_passwords_available
hook like so:add_filter( 'wp_is_application_passwords_available', '__return_true' );
if you tried the above answer and it didn't work for you try this 1- add this to the wp-config.php
define( 'WP_ENVIRONMENT_TYPE', 'staging' );
2- go to /MAMP/htdocs/your-site-folder/wp-content/themes/your-theme/function.php, and add this line
add_filter( 'wp_is_application_passwords_available', '__return_true' );
it worked with me after doing the second step, note that I am using Mamp
When you try to edit a user and enable application password, you will get this message:
The application password feature requires HTTPS, which is not enabled on this site.
If this is a development website you can set the environment type accordingly to enable **Application Passwords**.
and if you follow the provided link, you will go to WP_ENFIRONMENT_TYPE, section of wp-config.php, and you have the option to set it to one of the following values: local
, development
, staging
, or production
.
For me, I could only enable Application Passwords by adding the following line to wp-config.php:
`define('WP_ENVIRONMENT_TYPE', 'local');`
I thought development
would work, but it did not. Anyways, try different values and see which works best for you.
本文标签: errorsApplication passwords not working on localhost
版权声明:本文标题:errors - Application passwords not working on localhost? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736294388a1929348.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论