# Allow Application Passwords on Local Sites Without HTTPS

> Turns on Application Passwords for local and development copies of the site that run on plain http, so you can test REST API integrations and apps locally the same way as in production.

- Type: PHP
- Runs: Run everywhere
- Category: [Developer](https://wpide.com/library/category/developer/)
- Tags: rest-api, application-passwords, local-development
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/dev-app-passwords-on-local/

## Code

```php
add_filter( 'wp_is_application_passwords_available', function ( $available ) {
    return in_array( wp_get_environment_type(), array( 'local', 'development' ), true ) ? true : $available;
} );
```

## Notes

Only applies when WP_ENVIRONMENT_TYPE is local or development; production keeps WordPress's HTTPS requirement.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Allow Application Passwords on Local Sites Without HTTPS" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
