Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lysender/5d59e2410cd407ea3d9f89139fb48b13 to your computer and use it in GitHub Desktop.
Save lysender/5d59e2410cd407ea3d9f89139fb48b13 to your computer and use it in GitHub Desktop.
TIL - Enable application passwords on WordPress development environment

API Passwords vs Application Passwords

Forget about API passwords, they are useless in production.

You need the "Application Passwords" instead which can be used for "Basic" authentication when calling the REST API.

This requires HTTPS so this is normally not enabled in local development.

Enable Application Passwords in development environment

If you are using environment variables, you can simply set:

WP_ENVIRONMENT_TYPE=local

I used this when using the official Docker image of WordPress.

Restart the application and application passwords should now be enabled.

@lysender
Copy link
Author

@slick2 yes, the equivalent config will look like this:

define( 'WP_ENVIRONMENT_TYPE', 'local' );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment