Connect WordPress

For AI agents: the docs index is at /llms.txt, and every page is also served as markdown at its URL plus .md.

In this guide

BlogAutoPost publishes to WordPress through its core REST API, signing in with a username and an application password.

What you need

  • The site address, in the form https://example.com. A subdirectory install works.
  • A WordPress username (the account username, not the email address).
  • An application password created for that user in WordPress under Users, Profile, Application Passwords. Type it as WordPress shows it.
  • An account with the Author role or higher. It must be able to publish posts and upload files. Contributors cannot publish. Creating new tags needs the Editor role.
  • WordPress 5.6 or newer, with application passwords switched on. They need https, and some security plugins turn them off.

Connect a WordPress site

Site addresshttps://yourblog.example
WordPress usernameeditor
Application passwordabcd efgh ijkl mnop qrst uvwx
Verify and connect
  1. Site address. The https address of the site.
  2. Username. The account username, not the email.
  3. Application password. Typed as WordPress shows it.

Site address rules

Because your credentials are attached to every call, the site address must be https, with no username or password inside it, on the standard port. Addresses that resolve to private, loopback or link-local networks are refused. Redirects are never followed with your password attached.

If your address redirects, for example from http to https or from a bare domain to www, the error names the exact address to use instead. Type that one.

How verification works

Verification changes nothing on your site. It reads the REST root at /wp-json/, falls back to /?rest_route=/ for sites without pretty permalinks, checks that application passwords are enabled, and reads your user profile to confirm you can publish posts and upload files. On success it records the site name and canonical address.

What is set on each post

  • Title, slug, body, status, tags and the featured image with its alt text. Tags are created by name when they do not exist.
  • The meta description is sent as the post excerpt, which many themes and SEO plugins fall back to. WordPress core has no SEO title or description field, so the SEO title is not sent anywhere.
  • Language is not sent, because core has no per-post language field.
  • If the cover image has a license credit line, it is added to the end of the body.

Post on yourblog.example

TitleHow to repot a root-bound houseplant
Slugrepot-a-root-bound-houseplant
ExcerptRepotting takes about twenty minutes and one pot a size up.
Tagshouseplants, repotting
  1. Title. The post title as approved.
  2. Slug. Used to find an existing post before publishing.
  3. Excerpt. Carries the meta description.
  4. Tags. Created by name when they do not exist.
  5. Featured image. Uploaded with its alt text.

Retries never post twice

Before publishing, BlogAutoPost looks for an existing post with the same slug in any status, including drafts and private posts. If one exists it is reused, so a lost response or a retry cannot produce a second copy.

Check the connection

Each site shows one connection status: pending, connected, error or disconnected. Credentials are verified before they are stored, and credentials that do not verify are never stored. When a check fails, the site shows error with the reason in plain words, and the table below says what to do.

Connections

yourblog.exampleConnectedVerified: can publish posts and upload files
shop.exampleErrorauth_failed: use the account username and a fresh application password
studio.examplePendingWaiting for the site to be connected
notes.exampleDisconnectedStored credentials deleted, schedule off
  1. Connected. The credentials verified and are stored encrypted.
  2. Error. The check failed. The reason names the fix.

Change or remove a site

  • To change the username or application password, connect the site again with the new details. They are verified first, in the same way.
  • Disconnecting deletes the stored credentials and turns the schedule off. Posts already published stay on your blog.
  • You can also revoke the application password in WordPress. The next publish then fails with auth_failed until you connect again.

yourblog.example

WordPress connectionUsername editor, application password ending in uvwxConnect again
DisconnectDeletes the stored credentials and turns the schedule offDisconnect
  1. Connect again. New details are verified before they are stored.
  2. Disconnect. Published posts stay on your blog.

Failures and what to do

CodeMeaningWhat to do
auth_failedWordPress did not accept the username or application password.Use the account username and create a fresh application password.
application_passwords_disabledApplication passwords are off for the site or the user.Turn them on, then create a new password. Check security plugins and https.
forbiddenThe user is not allowed to do that step.Use an account with the Author role or higher.
missing_capabilityThe user cannot publish posts or upload files.Use an Author or higher account.
site_redirectThe address redirects somewhere else.Use the address the error names.
rest_api_unavailableThe REST API did not answer at either location.Allow the REST API in the security plugin or host settings and check the address.
not_foundWordPress could not find what was asked for.Check the address and that the REST API is reachable.
insecure_site_url, invalid_site_urlThe address is http or not a valid web address.Use the https version of the address.
media_upload_failedThe cover image upload failed, so nothing was posted.Fix the cause in the message, then retry.
invalid_requestWordPress rejected the request, with its reason.Read the reason and adjust the post or site.
blocked_targetThe address is private, not https or on a disallowed port.Use a public https address.

The full list, with retry guidance, is in errors.

Next guide

Connect Shopify

Connect a Shopify store with a custom app Admin API token: required scopes, blog selection, how verification works, duplicate protection and failure fixes.

Read the guide