WordPress REST API CLI for Openclaw

A production-ready CLI for automating WordPress content workflows, taxonomies, and user management using the native REST API.

codedao12
v1.0.0
Feb 2, 2026
7
6.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install wordpress

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install wordpress using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is WordPress REST API CLI?

This skill provides a robust, dependency-free interface for interacting with the WordPress REST API. Designed for developers and automation bots, it enables seamless management of posts, pages, categories, tags, and users directly from the command line. By leveraging Openclaw Skills, users can integrate WordPress into larger JSON-in/JSON-out data pipelines, making it ideal for headless CMS architectures, automated content distribution, and synchronization tasks.

The skill is built to be lightweight, utilizing Node.js native fetch capabilities to ensure high performance without the overhead of external HTTP libraries. It is specifically optimized for technical workflows where stability and predictable JSON output are critical for downstream automation.

WordPress REST API CLI Use Cases

  • Automating the creation and updating of blog posts or pages from external data sources or AI-generated content.
  • Bulk managing taxonomies like categories and tags across multiple WordPress instances to maintain SEO consistency.
  • Integrating WordPress into CI/CD pipelines for staging, testing, and publishing content automatically.
  • Fetching user data or content lists for data analysis, migration, or reporting tools.
  • Executing custom HTTP requests to extended or third-party REST API endpoints without needing additional client code.

How WordPress REST API CLI Works

  1. The CLI initializes by reading environment variables for authentication, supporting multiple methods including Basic Auth, Application Passwords, or JWT tokens.
  2. Users trigger specific commands such as posts:list or pages:create, passing parameters via command-line arguments or external JSON files.
  3. The skill constructs a secure HTTP request to the configured WP_BASE_URL using Node.js native fetch.
  4. The WordPress REST API processes the request and returns a standard JSON response based on the action performed.
  5. The CLI outputs the raw JSON results to stdout, allowing for easy integration with other Openclaw Skills or shell-based tools.

WordPress REST API CLI Setup

To get started with this skill from the Openclaw Skills collection, follow these steps:

# 1. Navigate to the skill directory
cd wordpress

# 2. Install necessary dependencies
npm install

# 3. Configure your environment variables
export WP_BASE_URL="https://your-wordpress-site.com"
export WP_USER="your_username"
export WP_APP_PASSWORD="xxxx xxxx xxxx xxxx"

# 4. Run a test command to list posts
npm run wp -- posts:list --query per_page=5

WordPress REST API CLI Data Schema & Taxonomy

The WordPress skill utilizes a structured data approach to ensure compatibility with standard Openclaw Skills workflows:

Component Data Format Description
Authentication Environment Variables Supports WP_BASIC_TOKEN, WP_JWT_TOKEN, or User/Pass combo.
Input Handling JSON / CLI Arguments Accepts inline JSON strings or file paths prefixed with @ for large payloads.
Output Format JSON All successful operations return standardized JSON objects to stdout.
Query Logic Key-Value Strings Uses --query key=value for filtering, sorting, and pagination.

WordPress REST API CLI Advanced Features

  • Support for raw request commands allowing interaction with any custom WordPress endpoint or plugin-extended API.
  • Intelligent input handling that loads complex JSON structures from local files using the @path convention.
  • Flexible authentication architecture compatible with Application Passwords and JWT Bearer tokens for different security environments.
  • Granular command mapping for specific entities like Categories, Tags, and Users, beyond just standard post types.
  • Designed for headless environments and multi-agent orchestration within the Openclaw Skills ecosystem.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*