---
title: "Publish WordPress posts with an app password"
url: "https://blogautopost.com/blog/wordpress-application-password-rest-api.md"
canonical_url: "https://blogautopost.com/blog/wordpress-application-password-rest-api"
last_updated: "2026-10-21"
type: "guide"
summary: "Step by step: create a WordPress application password, send it with Basic Auth and publish a post through the REST API."
related: ["https://blogautopost.com/blog.md", "https://blogautopost.com/blog/shopify-blog-article-graphql.md", "https://blogautopost.com/blog/webflow-cms-items-field-map.md"]
---

# Publish WordPress posts with an app password

> **For AI agents:** the complete index of BlogAutoPost pages is [llms.txt](https://blogautopost.com/llms.txt). Every page is also served as markdown at its URL plus .md.

Step by step: create a WordPress application password, send it with Basic Auth and publish a post through the REST API.

## What an application password is

WordPress 5.6 introduced application passwords, a way for a program to make authenticated requests without using the account's real password. The core team's integration guide describes the format: 24 characters made only of upper-case letters, lower-case letters and digits. WordPress shows the value in 6 chunks of four so a person can read it, and the spaces are optional, because they are stripped before the password is checked.

Each password belongs to a user and carries a name you choose, a creation time, and a record of where and when it was last used. The guide says the last-used column is accurate to within 24 hours, which makes it a handy way to spot a password nobody uses any more. One limit is worth knowing early: the guide says an application password is for programs, so it cannot be used to sign in on the normal login page.

## Check that your site offers them

By default application passwords are available to all users on sites served over HTTPS. Two things can turn them off: a site that is not on HTTPS, or a filter that a developer has set on purpose. The guide gives a direct test. Request the REST API root, normally `/wp-json/` on your domain, and look at the `authentication` key in the response. If that key is empty, application passwords are not available on that site.

## Create the password

1. Sign in to the WordPress dashboard as the user the integration should act as. Pick the lowest role that can do the job, since the credential carries that user's permissions.
2. Open the Edit User screen: Users, then Edit User.
3. Enter a name for the application and add the new password.
4. Copy the password into your secret store right away and paste it into the tool that will publish.

The same screen lists existing passwords and lets you revoke any of them, so a leaked or retired credential can be cut off without touching the account itself.

## Send the credential

The REST handbook says the credentials travel as Basic Auth (RFC 7617) on requests served over HTTPS. That means one header: the word Basic, then the Base64 of `username:password`. The example below is computed from a made-up user and password so you can see the shape; the spaces were removed before encoding.

Header built from the sample user and sample password

```http
Authorization: Basic ZWRpdG9yLWJvdDphYmNkRUZHSDEyMzRpamtsTU5PUDY3ODk=
```

On the command line you can let curl do the encoding with `--user "USERNAME:PASSWORD"`, which is the form the handbook uses for its own example.

## Publish a post

A new post is one `POST` request to `/wp/v2/posts` under the REST root. The reference lists the arguments; the table shows the ones a blog publisher normally sets.

| Field | What it carries |
| --- | --- |
| `title` | The post title. |
| `content` | The body, with its HTML markup. |
| `excerpt` | The short summary shown in lists. |
| `slug` | An alphanumeric identifier unique to the post type, used in the URL. |
| `status` | One of publish, future, draft, pending, private. |
| `categories` | Terms assigned in the category taxonomy, as an array. |
| `tags` | Terms assigned in the post_tag taxonomy, as an array. |
| `featured_media` | The ID of the featured media for the post. |

A minimal body, with sample values

```json
{
  "title": "How to pick a pour-over grinder",
  "content": "<p>Burr size matters more than price.</p>",
  "excerpt": "Three checks before you buy.",
  "slug": "pour-over-grinder",
  "status": "publish"
}
```

The response is the stored post. Two of its fields are read only and are the ones you keep: `id`, the unique identifier you will need to update the post later with `POST /wp/v2/posts/<id>`, and `link`, the public URL.

### Choosing a status

The reference allows five statuses: `publish`, `future`, `draft`, `pending` and `private`. Use `publish` for a live post, and `draft` when a person should look at it in the editor first. The date fields, `date` in the site's timezone and `date_gmt` in GMT, carry the publication date. Try a scheduled post on a test site first, since the reference does not spell out scheduling.

## When it does not work

| What you see | What the sources say to check |
| --- | --- |
| The `authentication` key in the REST root is empty | The site is not on HTTPS, or application passwords were turned off on purpose. |
| The password works in a script but not on the login form | That is by design: the guide says application passwords are for programs. |
| The list of posts is missing your new entry | The list endpoint returns published posts by default, so ask for the other statuses with the `status` argument. |

If you want to see how a scheduler handles the same steps, the [WordPress connection guide](https://blogautopost.com/docs/connect-wordpress.md) and the [WordPress integration page](https://blogautopost.com/integrations/wordpress.md) cover them, and the [indexability checker](https://blogautopost.com/tools/indexability-checker.md) is a quick way to confirm that a freshly published URL can be crawled.

## Frequently asked questions

### Do I have to keep the spaces in the password?

No. The core guide says spaces are stripped out before the password is hashed and verified, so the chunked form and the plain form both work. The chunks only exist to help a person read it.

### Does the password need HTTPS?

By default application passwords are available on sites served over HTTPS. The integration guide warns that without it the password can be seen on the network, and it names a filter for forcing availability for people who accept that risk.

### Can I limit an application password to publishing only?

Not by the password itself. The guide describes scoping as something the core team expects to add later. Until then, the credential acts with the permissions of its user, so create a user with a role that fits the job.

### How do I remove access?

Open the Edit User screen for that user and revoke the password. The guide describes the same screen for generating, viewing and revoking passwords.

## Sources

- [Application Passwords: Integration Guide (Make WordPress Core)](https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/), read 2026-10-19
- [Posts, REST API Handbook (Developer.WordPress.org)](https://developer.wordpress.org/rest-api/reference/posts/), read 2026-10-19
- [Authentication, REST API Handbook (Developer.WordPress.org)](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/), read 2026-10-19

## Related

- [The BlogAutoPost blog](https://blogautopost.com/blog.md)
- [Shopify articleCreate: publish blog posts](https://blogautopost.com/blog/shopify-blog-article-graphql.md)
- [Map posts to Webflow CMS collection fields](https://blogautopost.com/blog/webflow-cms-items-field-map.md)
