WordPress
Use Bearcat to prepare drafts in WordPress, publish posts through posting rules and update existing posts. WordPress appears as Blog in the list of distribution sites. Bearcat connects through the WordPress REST API.
Requirements
Section titled “Requirements”- WordPress 5.6 or later. Application passwords were added in that version.
- HTTPS. WordPress only offers application passwords over HTTPS or in a local environment.
- Application passwords enabled. Some security plugins disable them.
- An account with the Editor or Administrator role. Try login fails if the account is not allowed
to publish posts. WordPress filters the HTML of roles below Editor (capability
unfiltered_html), so tags from your template can be stripped. - No Cloudflare or other bot challenge in front of the site.
Bearcat calls the REST API through index.php?rest_route=. Any permalink setting works.
Create an application password
Section titled “Create an application password”- Log into WordPress with the account Bearcat should use.
- Open Users > Profile and scroll to Application Passwords.
- Enter a name, for example
Bearcat, and create the password. - Copy the password. WordPress shows it only once.
Add the distribution site
Section titled “Add the distribution site”Open Registrations > Distribution site registrations and add a site. Select WordPress and fill in these fields:
| Field | Value |
|---|---|
| Address | Blog address, for example https://example.org/. Include the installation folder if WordPress runs in a subfolder. |
| Username | The WordPress username |
| Application password | The application password, not the account password |
| Upload cover as featured image | Off by default. See Images. |
Save and click Try login.
Targets
Section titled “Targets”Choose a WordPress category as the Target. Bearcat also shows subcategories,
for example Movies › HD Movies. Each post and each rule has one category.
Posting
Section titled “Posting”Automatic posting publishes the post directly. Blogs have no threads or replies, so thread search, prefixes and posting mode do not apply.
With manual posting, you prepare a draft and publish it yourself:
- Click Prepare draft. Bearcat creates a draft in WordPress.
- Click Open draft. The link opens the WordPress editor (
/wp-admin/post.php?post=<ID>&action=edit). You must be logged into WordPress in that browser. - Publish the post in WordPress.
- Click I have posted. Bearcat stores
<address>/?p=<ID>under Posted locations without searching.
Thread search without dots on the Posting rules page also applies to blogs. When it is on (default), Bearcat replaces dots in the post title with spaces.
Updating a post replaces its entire content.
Existing posts
Section titled “Existing posts”Before automatic posting, Bearcat searches the blog for posts with the same title. Trashed posts do not count.
| Posts found | Action |
|---|---|
| No post | Creates a new post. |
| One published post from your account | Replaces its content and saves the URL under Posted locations. |
| One post from your account with a different status, for example a draft | Replaces its content, publishes it and saves the URL under Posted locations. |
| One post by another author | Skips the site and leaves the post unchanged. |
| Several posts | Skips the site and leaves the posts unchanged. |
When Bearcat updates an existing post, any manual edits to its content are lost. Its featured image stays unchanged. A skipped site stays pending and is checked again on every automatic run.
With manual posting, the compose step shows A post with this title already exists on the site. with links to the posts. You can still prepare a draft.
Template
Section titled “Template”Create a post template with the output format HTML. Only HTML templates are available when posting to WordPress.
Bearcat sends the rendered template unchanged as the post content. Wrap it in a wp:html block so the
block editor keeps the markup, and escape values with | html.escape:
For a complete example, see
tools/wordpress/release.scriban
in the repository.
Images
Section titled “Images”Link images from your image hoster in the template with imagelinks.
With Upload cover as featured image on, Bearcat downloads the cover of the release or collection, uploads it to the WordPress media library and sets it as the featured image of the new post or draft. Without a cover, the post gets no featured image. Bearcat does not upload screenshots to the media library.
- The account must be allowed to upload files. Otherwise Try login fails.
- Each new post with a cover adds a separate image to the media library.
- Deleting a post in WordPress does not delete its image.
- Updating a post does not change its featured image.
Not supported
Section titled “Not supported”- Tags
- Several categories per post
