मुख्य सामग्री पर जाएं

WordPress Toolkit

The WordPress toolkit connects a WordPress site to EKB Platform using an Application Password and lets agents and workflows find and read pages and posts, create and edit content using structured blocks, publish and unpublish pages, manage media, handle taxonomy, and restore revisions. The toolkit runs as the WordPress user configured on the agent and can only perform actions that account is permitted to do.

Prerequisites​

  • A WordPress site running WordPress 5.6 or later on HTTPS.
  • Permalinks set to anything other than Plain (go to Settings → Permalinks to check).
  • A WordPress Application Password — not your account password. Go to Users → Profile → Application Passwords, enter a name such as EKB Platform Agent, click Add New Application Password, and copy the generated string immediately. WordPress shows it only once.
  • Access to an EKB Platform project where you can configure an agent or workflow.
warning

The toolkit runs as the WordPress user configured on the agent. Every person who uses the agent acts as that same WordPress user — choose an account scoped to the job, not your administrator login. Never use your WordPress account password; always use an Application Password. Revoke the Application Password under Users → Profile to immediately cut off agent access.

Setup​

  1. Open the agent or workflow in EKB Platform

    Open the target agent and choose Toolkits. Add the WordPress toolkit.

  2. Enter the site URL

    Enter the Site URL as the site root only — for example https://your-site.com. Do not include /wp-admin, /wp-login.php, or /wp-json.

  3. Configure authentication

    Leave Authentication Method set to Application Password. Enter your WordPress username (not the label you gave the Application Password) and paste the generated Application Password credential.

  4. Enable the tools you need

    Enable only the tools required for the job. Start with read-only tools: Find Pages, List Pages, Get Page, List Posts, and Get Post.

  5. Test the connection

    Save the configuration and run Test Connection first. A successful response shows the connected WordPress username and its capabilities.

  6. Test with a draft

    Create one throwaway draft page to confirm write access before working on live content.

Available tools​

Find & Read​

ToolDescription
Find PagesResolves a natural-language page name to page candidates. Always call this before editing a page mentioned by name.
List PagesLists pages with optional filters for status, search, parent, and pagination.
Get PageReturns one page with editable block source content.

Create & Edit​

ToolDescription
Create PageCreates a page. Default status is draft. Pass a blocks array for structured Gutenberg content.
Update PageFull rewrite of a page. Prefer Append Blocks for additive changes.
Append BlocksAdds new blocks to the end of a page without touching existing content. Recommended for additive edits.

Publish​

ToolDescription
Publish PageSets a page status to published. Requires publish_pages capability on the connected account.
Unpublish PageReturns a page to draft status. Does not trash or delete the page.
Schedule PageSets a page to publish automatically at a future date and time.

Delete & Restore​

ToolDescription
Delete PageMoves a page to trash by default. Set force: true only for permanent, irreversible deletion.
Restore PageUntrashes a page and sets it back to draft by default.

History​

ToolDescription
List RevisionsLists saved revisions for a page.
Get RevisionReturns the raw block content of a specific revision.
Restore RevisionReads a revision's content and writes it back onto the page, creating a new revision.

Posts​

ToolDescription
List PostsLists posts with optional filters for status, search, categories, and tags.
Get PostReturns one post with editable block source content.
Create PostCreates a post with optional categories, tags, and featured media. Default status is draft.
Update PostUpdates a post. Supports expected_modified_gmt to detect concurrent edits.
Delete PostMoves a post to trash by default. force: true permanently deletes.

Media​

ToolDescription
List MediaLists media library items with optional search and pagination.
Upload MediaUploads a file by base64 string or URL. Returns the media ID and source URL for use in image blocks.
Delete MediaPermanently deletes a media item. Confirm before calling.

Taxonomy​

ToolDescription
List CategoriesLists post categories. Returns category IDs for use in Create Post and Update Post.
List TagsLists post tags. Returns tag IDs for use in Create Post and Update Post.
Create CategoryCreates a new post category.
Create TagCreates a new post tag.

Advanced​

ToolDescription
SearchSite-wide search across posts, pages, and terms.
Test ConnectionVerifies credentials and returns the connected username and capabilities. Run this first after setup.
Custom API CallAuthenticated request to any WordPress REST route. Bypasses verification and block validation. Use only when no dedicated tool covers the need.

Use cases​

  • Find a page by name, read its current content, append a new FAQ section, and confirm the change was applied.
  • Draft a new product page with structured Gutenberg blocks, review it, and publish it once approved.
  • Create a blog post with categories and tags, upload a featured image, and schedule it for a future date.
  • Restore a page to a previous revision after an edit that introduced a problem.
  • Search the media library for an existing image before uploading a duplicate.

Troubleshooting​

SymptomLikely causeFix
Wall of HTML or themed "Page not found"The Site URL contains a path such as /wp-admin.Set Site URL to the site root only — https://your-site.com.
Every call returns 404 and Site URL is cleanPermalinks are set to Plain, making the REST API unreachable.Go to Settings → Permalinks and select any option other than Plain.
401 rest_not_logged_inThe Username field contains the Application Password label, or an account password was used instead.Use the WordPress login username and the generated Application Password string. Run Test Connection to confirm.
No Application Passwords section in profileThe site is not on HTTPS, or WordPress is older than 5.6.Fix the site SSL certificate, or install the WP-API Basic-Auth plugin for HTTP-only development sites.
rest_cannot_* permissions errorThe connected account's role does not permit the requested action.Use an account with the required capabilities — publishing requires publish_pages.
TLS or certificate errorA self-signed certificate is in use.Uncheck Verify TLS certificate on development sites only. Never disable on production.