Editorial illustration; the tool, credential and API labels are representative, not a live WordPress dashboard.
Every few months a client asks how to connect an external script, Zapier/Make workflow, or reporting dashboard to their WordPress site. Too often, the vendor’s setup guide tells them to paste their main wp-admin username and password into a third-party form. That is an unnecessary risk: if that tool gets breached or you stop paying for it, you have to change your primary login and break every other script using it.
WordPress has had Application Passwords built into core since version 5.6. They are 24-character credentials designed strictly for REST API and XML-RPC requests—they cannot be used to log into wp-admin interactively, and each one can be named and revoked individually without touching your main password.
Confirm whether you even need authentication
Before generating any credential, check what the integration actually needs to do. The WordPress REST API already exposes published posts, pages, categories, and public media anonymously. If an external dashboard only needs to read published blog titles once a night, you probably don’t need an Application Password at all.
You do need authentication when the tool must read drafts or private posts, create or update content, upload media, or hit custom endpoints restricted by user capability. Write down the exact job first: “Create draft posts from our editorial sheet” is clear; “Connect marketing tool” is not.
Create a dedicated, least-privileged user
Even though an Application Password is limited to API calls, it still inherits every capability of the WordPress user it belongs to. If you generate an Application Password under your personal Administrator account, any script holding that token can install plugins, edit users, or delete the entire site via the REST API.
Instead, create a dedicated service user with the smallest role that gets the job done. Using WP-CLI:
wp user create svc_editorial_sync editorial-bot@example.com --role=author
If a reporting script only needs to read private metrics or drafts, don’t give it editor or administrator. Separate service accounts also make your activity logs and security audits readable: you can immediately tell whether an edit came from a human editor or svc_editorial_sync.
Generate and test the Application Password over HTTPS
WordPress requires HTTPS for Application Passwords in production (it only allows plain HTTP in local environments where WP_ENVIRONMENT_TYPE is set to local). Open Users > All Users, edit your dedicated service user, scroll to Application Passwords, give it a specific label like make-draft-importer-prod, and click Add New Application Password.
Copy the generated password immediately—WordPress hashes it and will never show it again. Note that WordPress displays spaces every four characters for readability; you can include or omit the spaces in Basic Auth, though stripping spaces avoids issues in stricter HTTP clients.
Test the credential with a harmless read-only call to /wp-json/wp/v2/users/me using curl (prefix the command with a space if your shell ignores leading-space commands in history, or pass credentials via an environment variable):
WP_USER="svc_editorial_sync"
WP_APP_PASS="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx" # replace with actual token without hyphens
curl -sS -u "${WP_USER}:${WP_APP_PASS}" \
https://example.com/wp-json/wp/v2/users/me | jq '.id, .name, .roles'
If you get 401 Unauthorized even with the right password, check your web server. On some Apache/CGI or custom Nginx + PHP-FPM setups, the Authorization header gets stripped before reaching PHP. In Nginx, ensure fastcgi_param HTTP_AUTHORIZATION $http_authorization; is passed, or in Apache .htaccess add CGIPassAuth On.
Once /users/me returns 200 OK, test the exact capability boundary in staging: confirm it can create a draft (POST /wp-json/wp/v2/posts with status: "draft"), and confirm it cannot access admin-only endpoints like /wp-json/wp/v2/users or /wp-json/wp/v2/settings.
Keep secrets out of the browser and Git
Never embed an Application Password in frontend JavaScript—anyone opening DevTools can copy it and impersonate that user. Keep it in server-side environment variables, GitHub Actions secrets, or your hosting platform’s secret store.
Create one Application Password per integration. If you share one token across a staging script, a reporting cron, and a Zapier webhook, revoking one compromised tool breaks the other two. When a vendor contract ends or a script is retired, open the user profile in WordPress, check the Last Used column to confirm nothing unexpected is still polling it, and click Revoke.
For related access design, see WordPress roles and capabilities and how to protect an admin login.