To create a WordPress application password, go to Users > Profile, scroll to the Application Passwords section, type a name for the app in “New Application Password Name”, and click Add Application Password. WordPress shows a 24-character password once. Copy it, then use it together with your username to authenticate REST API or XML-RPC requests.
Application Passwords have been built into core since WordPress 5.6, so there is no plugin to install. They only appear on HTTPS sites (or sites set to the local environment type), and they never work for the normal wp-admin login. Everything below was tested on WordPress 7.1.4 in WordPress Playground and checked against the core source, including what each failure actually returns.
- Create one under Users > Profile > Application Passwords: type a name, click Add Application Password, copy the password. It is shown only once.
- Use it with your username (or email) as HTTP Basic Auth on the REST API or XML-RPC. It will not log you in to wp-admin.
- WordPress requires HTTPS for them, unless the site’s environment type is
local. - A missing section usually means a filter or a security plugin (Wordfence has a setting for it) turned them off.
- Most failures come back as a generic
401 rest_not_logged_in, so the error code alone rarely tells you the real cause.
What Are WordPress Application Passwords?
A WordPress Application Password is a random password tied to one user account, meant for a script or external app instead of a person. Each one is 24 characters of letters and numbers, generated by wp_generate_password(), and displayed in groups of four for readability (for example j4By mm04 HI7E hhwV 5DaX Q3Y1).
WordPress never stores the plaintext. The hashes live in the _application_passwords user meta entry, alongside a UUID, the name you gave it, the creation time, and the last time and IP it was used. Since WordPress 6.8, new application passwords are hashed with wp_fast_hash(), which uses BLAKE2b through Sodium’s sodium_crypto_generichash(). On a 7.1.4 test site the stored value looked like $generic$tIz86Ff-.... Older phpass hashes from before 6.8 still verify, so existing passwords keep working after an upgrade.
Where an application password is accepted comes down to one check in core: the request has to be a REST API or XML-RPC request. Here is what that looks like in practice:
| Where you use it | Works? | What happened in testing (WP 7.1.4) |
|---|---|---|
REST API (/wp-json/) | Yes | Basic Auth with username or email plus the app password returned the user on /wp/v2/users/me |
XML-RPC (xmlrpc.php) | Yes, if XML-RPC is enabled | wp.getUsersBlogs succeeded with the app password; a wrong one returned fault 403 “Incorrect username or password.” |
| wp-admin login form | No | wp-login.php rejected the app password with the normal “The password you entered” error |
| WP-CLI on the server | Not needed | WP-CLI runs PHP directly and picks the user with --user, so it never asks for a password |
That is why they are safer to hand out than your real password:
- Each one is named (“Zapier”, “Deploy script”), so you can see what has access at a glance.
- You can create several per user and revoke any one of them without affecting the rest.
- They survive a change to your main password. In testing, calling
wp_set_password()left the existing application password in place and it kept authenticating. - Nobody can use one to sign in to the dashboard, even if it leaks.
If you are hardening the human side of logins too, see WordPress login security and how to change your WordPress login URL.
How to Set Up a WordPress Application Password
- Log in to your dashboard at
yoursite.com/wp-admin. - Go to Users > Profile. To make one for a different account, open Users > All Users, click the user, and use their Edit User screen instead.
- Scroll to the Application Passwords section near the bottom.
- Type a name in New Application Password Name, such as “Zapier” or “GitHub Actions”. The name is required.
- Click Add Application Password.
- Copy the password from the notice. WordPress will not show it again, so if you lose it, revoke it and create a new one.
Once it exists, the section turns into a table with columns for Name, Created, Last Used, Last IP, and Revoke. Last Used and Last IP are handy for spotting a password nobody needs anymore, but they are not a live log: core only updates them if the previous recorded use is more than a day old.
Why the Application Passwords section is missing
No HTTPS does not hide the section. Without it, WordPress still shows the heading with the message “The application password feature requires HTTPS, which is not enabled on this site.” If the whole section is gone, something switched the feature off. The usual suspects:
| What you see on the profile page | Likely cause | Fix |
|---|---|---|
| “The application password feature requires HTTPS, which is not enabled on this site.” | The site is on plain HTTP and the environment type is not local | Install an SSL certificate, or on a dev site set WP_ENVIRONMENT_TYPE to local |
| No Application Passwords section at all | A plugin or snippet returns false from wp_is_application_passwords_available | Search active plugins and functions.php for that filter |
| Section missing for some users only | A wp_is_application_passwords_available_for_user filter limits it by user or role | Check the same places for this filter |
| “Application passwords have been disabled by Wordfence” | Wordfence’s “Disable WordPress application passwords” option | Turn it off under Wordfence > All Firewall Options > Brute Force Protection |
| “Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.” | The site itself sits behind HTTP Basic Auth (common on staging) | Remove the server-level password, or test on a site without it |
| Nothing renders in the section | JavaScript is disabled; the section is hidden for no-JS browsers | Enable JavaScript |
Wordfence’s documentation says its option is on by default as of Wordfence 7.4.14, which is why so many sites running it never see the section. Other security plugins that restrict the REST API can break integrations too, so if you run one, check its REST API and login settings before blaming WordPress.
The HTTPS rule, exactly
Core decides this in wp_is_application_passwords_supported(), which is a single line: the feature is supported if is_ssl() is true or wp_get_environment_type() returns local. The result then passes through the wp_is_application_passwords_available filter, which is how plugins can still turn it off on an HTTPS site.
For a local dev site on http://, add this to wp-config.php above the “stop editing” line:
define( 'WP_ENVIRONMENT_TYPE', 'local' );
Only use local on actual local installs. Other plugins also read the environment type and may change behavior based on it.
Using an Application Password with the REST API
Application passwords use plain HTTP Basic Auth: your username and the application password. The spaces are optional, because core strips every non-alphanumeric character before checking it. Your email address also works in place of the username. All three variations returned the same user in testing. To read your draft posts with curl:
curl -u "your_username:xxxx xxxx xxxx xxxx xxxx xxxx" \
"https://yoursite.com/wp-json/wp/v2/posts?status=draft&context=edit"
Or to publish a new post:
curl -u "your_username:xxxx xxxx xxxx xxxx xxxx xxxx" \
-H "Content-Type: application/json" \
-X POST "https://yoursite.com/wp-json/wp/v2/posts" \
-d '{"title":"Hello from the API","content":"Posted via Application Password.","status":"publish"}'
The same pattern works in Postman, JavaScript fetch, Python requests (auth=("user", "app password")), or a CI workflow. WordPress treats the request as that user, so their role decides what is allowed. A user who is authenticated but lacks the capability gets a 403 such as rest_cannot_create. The WordPress REST API guide covers the endpoints themselves.
Two endpoints help when you are debugging. GET /wp-json/wp/v2/users/me/application-passwords/introspect returns the name, UUID, and last-used data of the password the request used, and GET /wp-json/wp/v2/users/me/application-passwords lists all of them. Both worked with Basic Auth in testing.
What the 401 errors mean
Core has a specific error code for each failure, but on a clean WordPress 7.1.4 install you usually will not see them. The application password check runs at priority 90 on rest_authentication_errors, while core only resolves the current user at priority 100. So a wrong password, an unknown user, and a disabled feature all came back as the same generic error. The specific codes show up only when something resolves the user earlier in that filter, which some plugins do.
| Cause | Clean 7.1.4 install | Specific code (when surfaced) |
|---|---|---|
No credentials reached WordPress (header stripped, typo in -u) | 401 rest_not_logged_in | none |
| Wrong application password, or your normal login password | 401 rest_not_logged_in | 401 incorrect_password |
| Username does not exist | 401 rest_not_logged_in | 401 invalid_username (or invalid_email) |
| Feature disabled for this user by filter | 401 rest_not_logged_in | 401 application_passwords_disabled_for_user |
| Feature disabled sitewide (no HTTPS, filter, Wordfence) | 401 rest_not_logged_in | 401 rest_not_logged_in; core’s application_passwords_disabled code is not reached on REST requests |
| Authenticated, but the role lacks the capability | 403, for example rest_cannot_create | same |
To see the real reason on your own site, log it from the application_password_failed_authentication action, which core fires with the underlying error every time:
add_action( 'application_password_failed_authentication', function ( $error ) {
error_log( 'App password failed: ' . $error->get_error_code() );
} );
With debug mode logging enabled, the code lands in wp-content/debug.log. If nothing is logged at all, WordPress never received the credentials, which points to the header problem below.
When Application Passwords Don’t Work (the HTTP_AUTHORIZATION Gotcha)
The most common real-world failure: some server setups drop the Authorization header before PHP sees it. WordPress then gets no credentials and answers 401 rest_not_logged_in.
Core already has a fallback. wp_populate_basic_auth_from_authorization_header() reads HTTP_AUTHORIZATION or REDIRECT_HTTP_AUTHORIZATION and fills in the username and password itself. It just needs Apache to pass the header through, which is what this line in your .htaccess does:
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Current WordPress writes that line into the # BEGIN WordPress block automatically, right after RewriteEngine On. If your file is older or hand-edited, add it there, or re-save Settings > Permalinks to regenerate the block. Nginx does not read .htaccess at all, so on Nginx hosting ask your host to confirm the Authorization header reaches PHP.
How Apps Request an Application Password (authorize-application.php)
Instead of asking you to copy and paste, an app can send you to a built-in approval screen and receive the password automatically. The screen lives at /wp-admin/authorize-application.php, and the REST API index (/wp-json/) advertises it under authentication.application-passwords.endpoints.authorization so apps can discover it.
The app builds a URL like this:
https://yoursite.com/wp-admin/authorize-application.php
?app_name=My+App
&app_id=3f0c7f9e-6a1b-4c1e-9a8f-2d5b7e1c4a90
&success_url=https://myapp.example/callback
&reject_url=https://myapp.example/denied
app_namebecomes the password’s name in your profile.app_idis optional, but if it is present it must be a UUID.- If you click “Yes, I approve of this connection”, WordPress redirects to
success_urlwithsite_url,user_login, andpasswordadded as query parameters. - If you click “No, I do not approve of this connection”, you go to
reject_urlwithsuccess=falseadded. - Both URLs must use HTTPS. Plain
httpis only allowed for127.0.0.1,[::1], or sites set to thelocalenvironment type, andjavascript:anddata:URLs are always rejected.
Without a success_url, WordPress shows the new password on screen for you to copy. Either way, only approve apps you trust: the password gets the full permissions of your account.
Managing Application Passwords with WP-CLI
If you have shell access, WP-CLI (2.6.0 and later) can manage them without the dashboard. Per the WP-CLI documentation, the command group is wp user application-password, with create, list, get, update, delete, exists, and record-usage subcommands. The ones you will use most:
# Create one and print only the password (good for scripts)
wp user application-password create admin "Deploy script" --porcelain
# List a user's application passwords
wp user application-password list admin --fields=uuid,name,last_used
# Revoke one by UUID, or all of them
wp user application-password delete admin 4aeef645-c039-4554-8bde-069d214ad0d3
wp user application-password delete admin --all
The user argument accepts a login, email, or user ID. If WP-CLI is new to you, start with these WP-CLI commands.
Managing Application Passwords
A few habits keep them from becoming a forgotten back door:
- Create one per integration, named after it, so revoking one never breaks another.
- Check the Last Used column every few months and revoke anything stale with Revoke. Revoke all application passwords at the bottom of the table clears every one for that user. Requests made with an application password never fire
wp_login, so they won’t show up in a last login tracker either. This column is where that activity shows. - Generate passwords on a dedicated user with the lowest role that does the job, not on your admin account. Core has no per-endpoint scoping, so the role is the only limit.
- Revoke and recreate after any suspected leak. Changing your main password does not invalidate application passwords.
That last point matters most for AI tools. An agent connected through WordPress MCP can do anything its user can, so give it its own low-privilege account and its own application password.
If you never use them, you can switch them off with one filter in a small plugin or your theme’s functions.php:
add_filter( 'wp_is_application_passwords_available', '__return_false' );
Or keep them for everyone except administrators:
add_filter( 'wp_is_application_passwords_available_for_user', function ( $available, $user ) {
return user_can( $user, 'manage_options' ) ? false : $available;
}, 10, 2 );
When to Use Application Passwords (and When Not To)
They fit any server-to-server job that needs to act as a WordPress user:
- Automation tools like Zapier, Make, n8n, and Pipedream reading or writing posts.
- Deploy or sync scripts in GitHub Actions or another CI system.
- A headless WordPress frontend that needs drafts or private content.
- Your own scripts and AI agents that call the REST API.
OAuth (via a plugin) still makes sense when many outside users need to authorize your app on sites you do not control, and JWT plugins suit single-page apps that want short-lived tokens. For one site and one integration, application passwords are simpler and need nothing installed. For your own dashboard login, passkeys are the modern upgrade; the two work side by side.
Frequently Asked Questions
How do I create a WordPress application password?
Go to Users > Profile in wp-admin, scroll to Application Passwords, enter a name in New Application Password Name, and click Add Application Password. Copy the password right away, because WordPress only shows it once. With WP-CLI, run wp user application-password create <user> <app-name>.
Why don’t I see Application Passwords in my WordPress profile?
If you see a message saying the feature requires HTTPS, the site is on plain HTTP; add SSL or set WP_ENVIRONMENT_TYPE to local on a dev site. If the section is missing entirely, a plugin or snippet disabled it through the wp_is_application_passwords_available filter. Wordfence does this with its “Disable WordPress application passwords” option.
Do the spaces in the application password matter?
No. WordPress removes every non-alphanumeric character before checking the password, so xxxx xxxx xxxx xxxx xxxx xxxx and the same 24 characters without spaces both work.
Can I use an application password to log in to wp-admin?
No. WordPress only accepts application passwords on REST API and XML-RPC requests. The normal login form rejects them, so a leaked application password cannot be used to open your dashboard.
Can I limit an application password to specific endpoints?
Not in core. The password has the full role and capabilities of the user it belongs to. Create a dedicated user with a limited role (Author, Editor, or a custom role) and generate the password on that account.
Do application passwords work on WordPress Multisite?
Yes, and they are network-wide for that user. The profile screen says it directly: an application password grants access to every site in the network the user has permissions on, and to all sites for a Super Admin. Use a user who only belongs to the sites the integration needs.
Wrapping Up
Application passwords are the built-in, boring, correct way to let scripts and apps into WordPress. Create one per integration under Users > Profile, keep them on low-privilege users, and revoke them when you stop using a service.
If one fails, remember that a clean install answers most problems with the same 401 rest_not_logged_in. Log the application_password_failed_authentication action to get the real code, and if nothing shows up, check that the Authorization header is reaching PHP.


