KosmoKrator

cms

WordPress CLI for Cron Jobs

Use the WordPress CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.

8 functions 6 read 2 write API key auth

WordPress CLI for Cron Jobs

Schedule repeatable integration workflows from cron while keeping credentials in KosmoKrator config.

Use the headless CLI from cron when an operation should run without an interactive agent session. The WordPress CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# WordPress CLI for Cron Jobs
kosmokrator integrations:configure wordpress --set url="$WORDPRESS_URL" --set username="$WORDPRESS_USERNAME" --set application_password="$WORDPRESS_APPLICATION_PASSWORD" --enable --read allow --write ask --json
kosmo integrations:call wordpress.wordpress_create_post '{"title":"example_title","content":"example_content","status":"example_status","excerpt":"example_excerpt","author":1,"categories":"example_categories","tags":"example_tags","featured_media":1}' --json

Discovery Before Execution

Agents and scripts can inspect WordPress docs and schemas before choosing a function.

kosmo integrations:docs wordpress --json
kosmo integrations:docs wordpress.wordpress_create_post --json
kosmo integrations:schema wordpress.wordpress_create_post --json
kosmo integrations:search "WordPress" --json
kosmo integrations:list --json

Useful WordPress CLI Functions

FunctionTypeParametersDescription
wordpress.wordpress_create_post Write title, content, status, excerpt, author, categories, tags, featured_media, slug Create a new post on the WordPress site. Requires a title. Content, status, categories, and tags can be specified. Defaults to draft status for safety.
wordpress.wordpress_get_current_user Read none Get the currently authenticated WordPress user profile. Returns user ID, name, email, roles, and capabilities.
wordpress.wordpress_get_post Read id Get a single WordPress post by its ID. Returns the full post object including title, content, excerpt, author, categories, tags, and metadata.
wordpress.wordpress_list_comments Read per_page, page, post, search, status, author, order, orderby List comments from the WordPress site. Supports filtering by post, status, author, and search. Returns comment IDs, content, author info, and dates.
wordpress.wordpress_list_pages Read per_page, page, search, status, author, parent, order, orderby List pages from the WordPress site. Supports filtering by status, author, search, and parent. Returns page IDs, titles, dates, and statuses.
wordpress.wordpress_list_posts Read per_page, page, search, status, author, categories, tags, order, orderby List posts from the WordPress site. Supports filtering by status, author, category, tag, and search. Returns post IDs, titles, dates, and statuses.
wordpress.wordpress_list_users Read per_page, page, search, roles, order, orderby List users registered on the WordPress site. Supports filtering by role and search. Returns user IDs, names, and email addresses.
wordpress.wordpress_update_post Write id, title, content, status, excerpt, author, categories, tags, featured_media, slug Update an existing WordPress post. Provide the post ID and any fields to change: title, content, status, categories, tags, etc.

Automation Notes

Related WordPress CLI Pages