For the complete documentation index, see llms.txt. This page is also available as Markdown.

WordPress

WordPress is the most popular CMS. Connect to create and manage posts, pages, media, categories, tags, and users via the WordPress REST API.

Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

Connector
Authentication

WordPress

Credentials

WordPress

Connect to WordPress to create and manage posts, pages, media, categories, tags, and users via the WordPress REST API.

Set up in WordPress

  1. Sign in to your WordPress site as a user with permission to manage the content you need (an administrator for full access).

  2. Copy the generated application password; it is shown only once. Note it is used with your WordPress username over HTTPS.

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select WordPress.

  2. Enter the credentials and connection details in the fields below.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

Connection fields

StackAI field
Required
What to enter

Site URL

Yes

The base URL of your WordPress site (e.g. https://example.com). For WordPress.com sites on the free plan, use https://your-site.wordpress.com. Pretty permalinks must be enabled (Settings -> Permalinks set to anything other than 'Plain'). Provider instructions.

Username

Yes

The WordPress username the application password belongs to. This is the account's login name, not the display name.

Application Password

Yes

Generate in WordPress under Users -> Profile -> Application Passwords. Copy the 24-character value displayed only once - WordPress does not show it again. Spaces are stripped automatically. Provider instructions.

Provider documentation: Setup reference.

Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

Use an action

  1. Add the required WordPress action to the workflow.

  2. Select a connection when the action requests one.

  3. Complete the required fields. Use the reference picker when a value comes from another workflow step.

  4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

Actions

Create Post

Create a new blog post.

Inputs

Field
Type
Required
Description

Title

string

Yes

Headline of the post.

Content

textarea

Yes

Main body of the post (HTML or Gutenberg block markup).

Status

select (string)

No

Post status. Available values: Publish, Future, Draft, Pending, Private. Default: draft.

Excerpt

textarea

No

Short summary shown in archive/listing views. Default: .

Slug

string

No

URL-friendly identifier. Leave blank to derive from the title. Default: .

Author

select (integer)

No

User ID to attribute as author. Leave blank for the connection's user. Options load from the selected connection.

Categories

multiple_select (integer)

No

Numeric category IDs to assign. Options load from the selected connection. Default: [].

Tags

multiple_select (integer)

No

Numeric tag IDs to assign. Options load from the selected connection. Default: [].

Featured Image

select (integer)

No

Media ID to use as the post's featured image. Options load from the selected connection.

Sticky

boolean

No

Pin the post to the top of the blog. Default: false.

Date

string

No

ISO-8601 publication date. Required when status='future'. Default: .

Outputs

Field
Type
Description

Post

object

The full post object as returned by WordPress after creation.

Post ID

integer

Numeric ID assigned by WordPress to the new post.

Post URL

string

Public URL of the post.

Update Post

Update an existing post.

Inputs

Field
Type
Required
Description

Post ID

integer

Yes

Numeric ID of the post to update.

Title

string

No

New title for the post. Leave blank to keep the current title. Default: .

Content

textarea

No

Replacement content (HTML or Gutenberg). Leave blank to keep existing. Default: .

Status

select (string)

No

New post status. Available values: Publish, Future, Draft, Pending, Private. Default: .

Excerpt

textarea

No

New excerpt. Leave blank to keep the current one. Default: .

Slug

string

No

New URL slug. Changing a slug breaks existing links. Default: .

Categories

multiple_select (integer)

No

Replacement list of category IDs. Empty keeps current. Options load from the selected connection. Default: [].

Tags

multiple_select (integer)

No

Replacement list of tag IDs. Empty keeps current. Options load from the selected connection. Default: [].

Featured Image

select (integer)

No

New featured-image media ID. Leave blank to keep current. Options load from the selected connection.

Outputs

Field
Type
Description

Post

object

The updated post object.

Post ID

integer

Numeric ID of the updated post.

Get Post

Retrieve a single post by ID.

Inputs

Field
Type
Required
Description

Post ID

integer

Yes

Numeric ID of the post to fetch.

Outputs

Field
Type
Description

Post

object

Full post object.

List Posts

List posts with optional filters.

Inputs

Field
Type
Required
Description

Search

string

No

Free-text search. Leave blank to list without filtering. Default: .

Status

multiple_select (string)

No

Statuses to include. Available values: Publish, Future, Draft, Pending, Private. Default: .

Author

select (integer)

No

Filter by author ID. Options load from the selected connection.

Categories

multiple_select (integer)

No

Filter to posts in any of these categories. Options load from the selected connection. Default: [].

Tags

multiple_select (integer)

No

Filter to posts tagged with any of these tag IDs. Options load from the selected connection. Default: [].

Sticky Only

boolean

No

Filter to sticky posts only.

Order By

string

No

Sort field: date, title, id, modified, author, slug, include, relevance. Default: .

Order

string

No

Sort direction: asc or desc. Default: .

Per Page

integer

No

Number of posts per page (1-100). Minimum: 1. Maximum: 100. Default: 20.

Page

integer

No

Page number (1-indexed). Minimum: 1. Default: 1.

Outputs

Field
Type
Description

Posts

array

Array of posts for the requested page.

Count

integer

Number of posts returned in this page.

Delete Post

Move a post to trash or permanently delete it.

Inputs

Field
Type
Required
Description

Post ID

integer

Yes

Numeric ID of the post to delete.

Force

boolean

No

true permanently deletes; false moves to trash (recoverable). Default: false.

Outputs

Field
Type
Description

Post ID

integer

Numeric ID of the deleted post.

Deleted

boolean

True when WordPress confirmed permanent deletion.

Create Page

Create a new page.

Inputs

Field
Type
Required
Description

Title

string

Yes

Headline of the page.

Content

textarea

Yes

Main body of the page (HTML or Gutenberg block markup).

Status

select (string)

No

Page status. Available values: Publish, Future, Draft, Pending, Private. Default: draft.

Slug

string

No

URL-friendly identifier. Leave blank to derive from the title. Default: .

Parent Page

select (integer)

No

Parent page ID for nested pages. Leave blank for top-level. Options load from the selected connection.

Menu Order

integer

No

Ordering of sibling pages (lower sorts first).

Author

select (integer)

No

User ID to attribute as author. Options load from the selected connection.

Featured Image

select (integer)

No

Media ID to use as the page's featured image. Options load from the selected connection.

Template

string

No

Theme-specific template file for the page. Leave blank for default. Default: .

Outputs

Field
Type
Description

Page

object

The full page object as returned by WordPress.

Page ID

integer

Numeric ID assigned by WordPress to the new page.

Page URL

string

Public URL of the page.

Update Page

Update an existing page.

Inputs

Field
Type
Required
Description

Page ID

integer

Yes

Numeric ID of the page to update.

Title

string

No

New title. Leave blank to keep current. Default: .

Content

textarea

No

Replacement content. Leave blank to keep current. Default: .

Status

select (string)

No

New page status. Available values: Publish, Future, Draft, Pending, Private. Default: .

Slug

string

No

New URL slug. Changing breaks existing links. Default: .

Parent Page

select (integer)

No

New parent page ID. Set 0 to move to top level. Options load from the selected connection.

Menu Order

integer

No

New ordering value (lower sorts first).

Featured Image

select (integer)

No

New featured-image media ID. Leave blank to keep current. Options load from the selected connection.

Outputs

Field
Type
Description

Page

object

The updated page object.

Page ID

integer

Numeric ID of the updated page.

Get Page

Retrieve a single page by ID.

Inputs

Field
Type
Required
Description

Page ID

integer

Yes

Numeric ID of the page to fetch.

Outputs

Field
Type
Description

Page

object

Full page object.

List Pages

List pages with optional filters.

Inputs

Field
Type
Required
Description

Search

string

No

Free-text search. Default: .

Status

multiple_select (string)

No

Statuses to include. Available values: Publish, Future, Draft, Pending, Private. Default: .

Parent Page

select (integer)

No

Filter to pages with this parent ID. Options load from the selected connection.

Author

select (integer)

No

Filter by author ID. Options load from the selected connection.

Order By

string

No

Sort field. Default: .

Order

string

No

Sort direction: asc or desc. Default: .

Per Page

integer

No

Pages per result page (1-100). Minimum: 1. Maximum: 100. Default: 20.

Page

integer

No

Page number (1-indexed). Minimum: 1. Default: 1.

Outputs

Field
Type
Description

Pages

array

Array of pages for the requested page.

Count

integer

Number of pages returned.

Delete Page

Move a page to trash or permanently delete it.

Inputs

Field
Type
Required
Description

Page ID

integer

Yes

Numeric ID of the page to delete.

Force

boolean

No

true permanently deletes; false moves to trash. Default: false.

Outputs

Field
Type
Description

Page ID

integer

Numeric ID of the deleted page.

Deleted

boolean

True when WordPress confirmed permanent deletion.

Upload Media

Upload a file to the media library from a public URL.

Inputs

Field
Type
Required
Description

File URL

string

Yes

Publicly accessible URL of the file to upload. The action fetches the bytes and streams them to WordPress.

Filename

string

No

Filename to store the attachment under. Defaults to the URL's name. Default: .

Title

string

No

Display title for the attachment. Default: .

Alt Text

string

No

Alt text for accessibility. Default: .

Caption

textarea

No

Caption displayed with the attachment. Default: .

Description

textarea

No

Long-form description of the attachment. Default: .

Outputs

Field
Type
Description

Media

object

The uploaded media object.

Media ID

integer

Numeric ID assigned to the new attachment.

Source URL

string

Public URL where the attachment can be downloaded.

List Media

List media items in the library.

Inputs

Field
Type
Required
Description

Search

string

No

Free-text search. Default: .

Media Type

string

No

Filter by type: image, video, audio, application, text. Default: .

MIME Type

string

No

Filter by exact MIME type. Default: .

Parent Post

integer

No

Filter to media attached to this post ID.

Per Page

integer

No

Items per page (1-100). Minimum: 1. Maximum: 100. Default: 20.

Page

integer

No

Page number (1-indexed). Minimum: 1. Default: 1.

Outputs

Field
Type
Description

Media

array

Array of media attachments.

Count

integer

Number of media items returned.

Delete Media

Permanently delete a media attachment.

Inputs

Field
Type
Required
Description

Media ID

integer

Yes

Numeric ID of the media attachment to delete permanently.

Outputs

Field
Type
Description

Media ID

integer

Numeric ID of the deleted attachment.

Deleted

boolean

True when WordPress confirmed deletion.

List Categories

List categories defined on the site.

Inputs

Field
Type
Required
Description

Search

string

No

Free-text search across category names. Default: .

Hide Empty

boolean

No

Exclude categories with no posts. Default: false.

Per Page

integer

No

Items per page (1-100). Minimum: 1. Maximum: 100. Default: 20.

Page

integer

No

Page number (1-indexed). Minimum: 1. Default: 1.

Outputs

Field
Type
Description

Categories

array

Array of category objects.

Count

integer

Number of categories returned.

List Tags

List tags defined on the site.

Inputs

Field
Type
Required
Description

Search

string

No

Free-text search across tag names. Default: .

Hide Empty

boolean

No

Exclude tags with no posts. Default: false.

Per Page

integer

No

Items per page (1-100). Minimum: 1. Maximum: 100. Default: 20.

Page

integer

No

Page number (1-indexed). Minimum: 1. Default: 1.

Outputs

Field
Type
Description

Tags

array

Array of tag objects.

Count

integer

Number of tags returned.

List Users

List users on the site.

Inputs

Field
Type
Required
Description

Search

string

No

Free-text search across user names and logins. Default: .

Roles

string

No

Comma-separated role slugs to filter by. Default: .

Only Authors

boolean

No

Restrict to users who can author posts. Default: false.

Per Page

integer

No

Items per page (1-100). Minimum: 1. Maximum: 100. Default: 20.

Page

integer

No

Page number (1-indexed). Minimum: 1. Default: 1.

Outputs

Field
Type
Description

Users

array

Array of user objects.

Count

integer

Number of users returned.

Important behavior

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.

Last updated

Was this helpful?