WordPress REST API integration skill for OpenClaw. Manage posts, pages, media, and more programmatically.
- ✅ Full CRUD - Create, read, update, delete posts/pages
- ✅ Gutenberg Support - Native block format
- ✅ Secure Auth - Application Passwords (recommended)
- ✅ Media Management - Upload and manage media files
- ✅ Batch Operations - List, filter, and bulk actions
- ✅ Plugin Support - ACF, JetEngine, Rank Math, Yoast SEO
- ✅ Minimal Dependencies - Core scripts use stdlib, plugin scripts use requests
clawhub install wordpress-apicd ~/.openclaw/workspace/skills/
git clone https://github.com/Digitizers/wordpress-api-openclaw-skill wordpress-api1. Copy config template:
cd ~/.openclaw/workspace/skills/wordpress-api
cp config/sites.example.json config/sites.json2. Edit config/sites.json:
{
"sites": {
"site1": {
"url": "https://site1.com",
"username": "admin",
"app_password": "xxxx xxxx xxxx",
"description": "First site"
},
"site2": {
"url": "https://site2.com",
"username": "admin",
"app_password": "yyyy yyyy yyyy",
"description": "Second site"
}
},
"groups": {
"all": ["site1", "site2"]
}
}3. Use the CLI wrapper:
# List sites
./wp.sh --list-sites
# Update post on specific site
./wp.sh site1 update-post --id 123 --content "New content"
# Update on all sites
./wp.sh all update-post --id 456 --status "publish"
# Batch update
python3 scripts/batch_update.py --group all --post-ids 123,456 --status "publish"- Go to:
https://yoursite.com/wp-admin/profile.php - Scroll to "Application Passwords"
- Name: "OpenClaw API"
- Click "Add New Application Password"
- Copy the password
export WP_URL="https://yoursite.com"
export WP_USERNAME="your-username"
export WP_APP_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx"Update a post:
python3 ~/.openclaw/workspace/skills/wordpress-api/scripts/update_post.py \
--post-id 123 \
--title "New Title" \
--content "Updated content" \
--status "publish"Create a post:
python3 scripts/create_post.py \
--title "My Post" \
--content "Post content here" \
--status "draft"Get a post:
python3 scripts/get_post.py --post-id 123List posts:
python3 scripts/list_posts.py --per-page 10 --status "publish"| Script | Purpose |
|---|---|
update_post.py |
Update existing post |
create_post.py |
Create new post |
get_post.py |
Retrieve single post |
list_posts.py |
List/filter posts |
| Script | Purpose |
|---|---|
detect_plugins.py |
Auto-detect installed plugins (ACF, Rank Math, Yoast, JetEngine) |
acf_fields.py |
Read/write Advanced Custom Fields |
seo_meta.py |
Read/write Rank Math & Yoast SEO meta |
jetengine_fields.py |
Read/write JetEngine custom fields |
Examples:
# Detect plugins
python3 scripts/detect_plugins.py
# Get ACF fields
python3 scripts/acf_fields.py --post-id 123
# Set SEO meta
python3 scripts/seo_meta.py --post-id 123 --set '{"title": "SEO Title", "description": "Meta desc"}'
# Update JetEngine field
python3 scripts/jetengine_fields.py --post-id 123 --field my_field --value "value"- SKILL.md - Full skill documentation
- references/api-reference.md - WordPress REST API reference
- references/gutenberg-blocks.md - Gutenberg block format guide
- Python 3.6+
- WordPress 4.7+ (REST API built-in)
- Application Passwords (WordPress 5.6+ or plugin for older versions)
requestslibrary (for plugin integration scripts):pip install requests
- ✅ Use Application Passwords (not regular passwords)
- ✅ Always use HTTPS
- ✅ Store credentials in environment variables
- ❌ Never commit credentials to git
- Publishing blog posts
- Content migration
- Batch updates
- Automated publishing
- Content management workflows
- Integration with other systems
MIT License - See LICENSE.txt
- OpenClaw: https://openclaw.ai
- ClawHub: https://clawhub.com
- WordPress REST API: https://developer.wordpress.org/rest-api/
Built with ❤️ for OpenClaw by Digitizer