Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,5 @@ password.
| Change a setting | [Settings](configuration.md) |
| Something does not work | [When something goes wrong](troubleshooting.md) |
| What is stored and sent | [Security](security.md) |
| How wordpress differs from other WordPress tools | [Comparison](https://wirecat.dev/en/docs/wordpress/compare) |
| What comes next | [Roadmap](roadmap.md) |
58 changes: 41 additions & 17 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,56 @@
# When something goes wrong

Get `wordpress` working again from the symptom you see. Most failures come from the application password, your
WordPress role or the profile's permissions, and each has a check that names the cause.
A command stopped with an error, a sync did not bring your posts, or the agent says it may not publish. Most of these
take one step to fix, and the error message names that step.

You find your symptom in the table, run the check it gives, and retry the command. If it still fails, you have the
error code and the profile name ready for a support request.
Find what you see in the list and do what it says. If the problem stays, write to us with the error code and the
command you ran.

**On this page:**

1. [First checks](#first-checks)
2. [Symptoms and what to do](#symptoms-and-what-to-do)
3. [Ask for help](#ask-for-help)
1. [What happened](#what-happened)
2. [How to fix it](#how-to-fix-it)
3. [Check that it works](#check-that-it-works)
4. [Ask for help](#ask-for-help)
5. [Symptoms and error codes](#symptoms-and-error-codes)

## First checks
## What happened

`blog` below is the profile, a name you chose for one site.
- **The sign-in stopped working.** The application password was revoked or mistyped, or it belongs to another user.
- **Your WordPress role does not allow it.** An Author or Contributor cannot list pages, and a Contributor cannot
publish.
- **The profile does not allow it.** You, or a default setting, made this write "read only" or "refuse".
- **The copy is out of date.** The post changed on the site after the last sync.
- **The sync held back.** WordPress listed far fewer posts than your copy has, so nothing was marked deleted.

## How to fix it

1. Read the message. It names the step, such as the `sync` to run or the `chmod` to type.
2. Run `wordpress blog session status --check`. It asks your site whose password it is, or shows why the site refused
it. `blog` is the profile, a name you chose for one site. If the password is refused, make a new one
([how](installation.md#make-an-application-password-in-wordpress)) and sign in again.
3. Run `wordpress blog sync`, look at the post again and retry the command.
4. If a write is refused, see [permissions](permissions.md) for the line that allows it.
5. If a sync held back, check the sign-in first. If the posts really are gone, run the
`sync --allow-deletions` that the message prints. [Sync](usage.md#sync) explains the hold.
6. Find the exact symptom or code in the [table](#symptoms-and-error-codes).

## Check that it works

```sh
wordpress doctor # the version, the settings, the profiles, without the network
wordpress blog session status --check # asks your site whose password it is
```

## Symptoms and what to do
Then run the command that failed again. It is fixed when it ends without an error.

## Ask for help

Ask on [Discord](https://discord.gg/DebENqbRrJ), or open an
[issue](https://github.com/WireCatLabs/wordpress-cli/issues) with the error code, the profile name and the command.
Never paste a password, a token or private content into a support request.

## Symptoms and error codes

| Symptom | What to do |
| --- | --- |
Expand All @@ -34,8 +63,9 @@ wordpress blog session status --check # asks your site whose password it is
| No **Application Passwords** section in your profile | The site needs WordPress 5.7 or later over https, and a plugin or the host may turn the section off. Ask the site's admin. |
| A WordPress.com address | WordPress.com sites are not supported, only self-hosted WordPress. |
| `posts list` is empty | Run `wordpress blog sync` first. Posts are read from the copy it makes. |
| `sync` names gaps, or pages are missing | An Author or Contributor sign-in cannot list pages and gets only their own posts; a Contributor only their drafts and posts waiting for review. Only an Administrator gets every user with an e-mail; other roles get the authors with published posts. Sign in as an Administrator for a full copy, or as an Editor for every post and page. |
| `sync` names gaps, or pages are missing | An Author or Contributor sign-in cannot list pages and gets only their own posts. A Contributor gets only their drafts and posts waiting for review. Only an Administrator gets every user with an e-mail, and other roles get the authors with published posts. Sign in as an Administrator for a full copy, or as an Editor for every post and page. |
| A change on the site is missing from the copy | Run `sync`. If the post is not yours and you sign in as an Author or Contributor, see the row above. |
| `sync` marks nothing deleted and prints `--allow-deletions` | WordPress listed far fewer posts than the copy holds, most often because the sign-in lost rights. Check the sign-in. If the posts really are gone, run the `sync --allow-deletions` it prints. See [sync](usage.md#sync). |
| `content.conflict` | The post changed on the site since the last sync. Run `sync`, look at the post again, then retry. |
| `content.lossy-body` | The post has galleries, columns, embeds or iframes that Markdown cannot keep. Change only its title, excerpt, tags or status, or add `--replace-body` to write the body anyway and flatten them. See [when a write stops](usage.md#when-a-write-stops). |
| `content.schedule-past` | `--at-time` must be ahead of now. |
Expand All @@ -48,9 +78,3 @@ wordpress blog session status --check # asks your site whose password it is
| `doctor` lists `files.problems` | Other users of the computer can read `config.json` or enter its folder. Run each `chmod` that `doctor` prints after "to make it private:". `doctor` never changes a file mode itself. |
| "the OS keyring did not answer" | The computer has no keyring running. Sign in with `--credential-storage file`. |
| A write is refused | The profile's permissions or `WCWP_READ_ONLY` stop it. See [permissions](permissions.md). |

## Ask for help

Ask on [Discord](https://discord.gg/DebENqbRrJ), or open an
[issue](https://github.com/WireCatLabs/wordpress-cli/issues) with the error code, the profile name and the command.
Never paste a password, a token or private content into a support request.
11 changes: 5 additions & 6 deletions docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Use it

Find a post, write a draft or schedule it with one short command, the same one your agent runs. WordPress's API speaks
in numeric ids, raw block markup and status codes, and `wordpress` gives you Markdown and plain status words instead.

You find last month's posts, a forgotten draft or a page's text in one line. An agent does the same from your request.
Find last month's posts, finish a forgotten draft or schedule it for Monday morning, with commands that take Markdown
and plain words such as `draft` instead of block markup. Your agent runs the same commands when you ask it in your own
words.

Every command starts with a profile, the name you gave one site's sign-in. `sync` copies your posts and pages into the
WireCat local store, where the read commands find them. You need a signed-in profile: [install](installation.md) sets
Expand Down Expand Up @@ -60,8 +59,8 @@ copy.

A sync that would mark most of the copy deleted at once marks nothing and says why: WordPress listed far fewer posts
than the copy holds, most often because the sign-in lost rights. Check the sign-in first. If the posts really are
gone, run `wordpress blog sync --allow-deletions <count>` with the number the message names. `--rescan` lists
everything again but does not lift this hold. Only you can pass `--allow-deletions`: an MCP client is not offered it.
gone, run `wordpress blog sync --allow-deletions 40`, with the number the message names in place of 40.
`--rescan` lists everything again but does not lift this hold. Only you can pass `--allow-deletions`: an MCP client is not offered it.

## Read posts and pages

Expand Down
Loading