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 address. The https address of the site.
- Username. The account username, not the email.
- 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
- Title. The post title as approved.
- Slug. Used to find an existing post before publishing.
- Excerpt. Carries the meta description.
- Tags. Created by name when they do not exist.
- 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
- Connected. The credentials verified and are stored encrypted.
- 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_faileduntil you connect again.
yourblog.example
- Connect again. New details are verified before they are stored.
- Disconnect. Published posts stay on your blog.
Failures and what to do
| Code | Meaning | What to do |
|---|---|---|
auth_failed | WordPress did not accept the username or application password. | Use the account username and create a fresh application password. |
application_passwords_disabled | Application passwords are off for the site or the user. | Turn them on, then create a new password. Check security plugins and https. |
forbidden | The user is not allowed to do that step. | Use an account with the Author role or higher. |
missing_capability | The user cannot publish posts or upload files. | Use an Author or higher account. |
site_redirect | The address redirects somewhere else. | Use the address the error names. |
rest_api_unavailable | The REST API did not answer at either location. | Allow the REST API in the security plugin or host settings and check the address. |
not_found | WordPress could not find what was asked for. | Check the address and that the REST API is reachable. |
insecure_site_url, invalid_site_url | The address is http or not a valid web address. | Use the https version of the address. |
media_upload_failed | The cover image upload failed, so nothing was posted. | Fix the cause in the message, then retry. |
invalid_request | WordPress rejected the request, with its reason. | Read the reason and adjust the post or site. |
blocked_target | The 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