WordPress
The robomotion wordpress CLI connects to WordPress sites via the REST API for content management. It creates and manages posts and pages, handles categories and tags, uploads media, and administers users and comments.
When to use
- Create, update, list, or delete posts and pages
- Manage categories, tags, and media uploads
- Administer users and moderate comments
Prerequisites
robomotionCLI installed- Package installed:
robomotion install wordpress - WordPress site URL and API credentials configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install wordpress - Connect with session:
robomotion wordpress wordpress_connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion wordpress wordpress_create_post --client-id "<client-id>" --title <title> --content <html> --status draft --session-id "<session-id>" --output json - Disconnect when done:
robomotion wordpress wordpress_disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion wordpress connect --url --session --output jsonConnect to WordPress using Basic Auth and return a client ID for subsequent operationsrobomotion wordpress create_post --client-id --post [--site-url] --session-id "<session-id>" --output jsonCreate a new post in WordPress with specified content and settingsrobomotion wordpress list_posts --client-id [--site-url] [--status] [--1] [--100] --session-id "<session-id>" --output jsonList posts from WordPress with optional filtering by status and paginationrobomotion wordpress create_category --client-id --category [--site-url] --session-id "<session-id>" --output jsonCreate a new category in WordPressrobomotion wordpress list_categories --client-id [--site-url] --session-id "<session-id>" --output jsonList all categories from WordPressrobomotion wordpress create_media --client-id --file-path --file-name [--site-url] [--content-type] --session-id "<session-id>" --output jsonUpload a media file to WordPress media libraryrobomotion wordpress disconnect --client-id --session-id "<session-id>" --output jsonDisconnect from WordPress and release the client connectionrobomotion wordpress delete --client-id --object-id [--site-url] [--object] --session-id "<session-id>" --output jsonDelete a post٫ media٫ or category from WordPressrobomotion wordpress update --client-id --object-id --object [--site-url] [--object] --session-id "<session-id>" --output jsonUpdate an existing post or category in WordPressrobomotion wordpress get --client-id --object-id [--site-url] [--object] --session-id "<session-id>" --output jsonGet a single post or category from WordPress by IDrobomotion wordpress list_media --client-id [--site-url] --session-id "<session-id>" --output jsonList all media files from WordPress media library
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)