Remote OpenClaw

Remote OpenClaw Blog

OpenClaw + WordPress: Automated Content Publishing

5 min read ·

Why Connect OpenClaw to WordPress?

WordPress powers over 40% of all websites. For content teams, connecting OpenClaw to WordPress automates the most tedious parts of the publishing workflow: formatting drafts, setting SEO metadata, scheduling posts, managing categories and tags, and uploading media.

Tested in production with a content team publishing 15+ articles per week, the OpenClaw-WordPress integration cut publishing time per article from 25 minutes to under 5 minutes. The AI agent handles all the CMS busywork while writers focus on creating content.

This guide covers self-hosted WordPress (WordPress.org) setup, which is the most common and flexible option. For managing content across both WordPress and social media, combine this with the LinkedIn integration. New to OpenClaw? Start with the beginner setup guide.


Prerequisites


Step-by-Step Setup

Step 1: Create an Application Password

In WordPress admin, go to Users > Profile > Application Passwords:

  1. Enter a name like "OpenClaw Integration"
  2. Click "Add New Application Password"
  3. Copy the generated password (it is shown only once)
# Store WordPress credentials
export WP_SITE="https://yoursite.com"
export WP_USER="your-admin-username"
export WP_APP_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx"

# Verify the connection
curl -s -u "$WP_USER:$WP_APP_PASSWORD" \
  "$WP_SITE/wp-json/wp/v2/posts?per_page=1" | jq '.[0].title.rendered'

Step 2: Configure OpenClaw

# ~/.openclaw/config.yaml
integrations:
  wordpress:
    site_url: ${WP_SITE}
    username: ${WP_USER}
    app_password: ${WP_APP_PASSWORD}
    default_status: "draft"  # draft, publish, or future
    default_author: 1  # WordPress user ID

skills:
  - name: wordpress-publisher
    trigger: "wordpress"
    actions:
      - create_post
      - update_post
      - schedule_post
      - upload_media
      - manage_categories
      - update_seo

Step 3: Install and Test

# Install the WordPress skill
openclaw skill install wordpress-publisher

# Test creating a draft post
openclaw run "Create a WordPress draft post titled 'Test Integration Post' with a short paragraph of content, category 'Uncategorized', and tag 'test'"

# Test listing recent posts
openclaw run "List the 5 most recent WordPress posts with their status and publish date"

Example Use Cases

1. Content Pipeline Automation

openclaw run "Take this markdown article and publish it as a WordPress draft:
- Generate an SEO-optimized title (under 60 characters)
- Write a meta description (155 characters)
- Set the category to 'Tutorials'
- Add relevant tags based on the content
- Set a featured image from the Media Library that matches the topic
- Schedule for next Tuesday at 9am EST"

2. Bulk Content Scheduling

openclaw run "Read the content calendar from the Airtable 'Blog Posts' table. For each post marked as 'Ready for Publishing', create a WordPress scheduled post with the title, content, category, and publish date from the Airtable record. Update the Airtable status to 'Scheduled'."

3. SEO Audit and Update

OpenClaw can audit existing posts for SEO issues and batch-update meta descriptions, alt text, and internal links across your WordPress site.


Troubleshooting Tips

401 Unauthorized

Application passwords require Basic auth over HTTPS. If your site does not use HTTPS, application passwords will not work. Also verify that application passwords are enabled (some security plugins disable them).

Marketplace

Free skills and AI personas for OpenClaw — browse the marketplace.

Browse the Marketplace →

REST API Returning 404

If /wp-json/wp/v2/ returns a 404, check your permalink settings. The REST API requires "pretty" permalinks — go to Settings > Permalinks and select any option except "Plain."

Posts Not Showing on Frontend

Posts created via API default to the status you set in the config. If you set default_status: "draft", posts will not be visible on the frontend until published. Verify the post status in the WordPress admin.

Media Upload Failures

WordPress restricts file types by default. If an image upload fails, check that the file type is in WordPress's allowed mime types. Some hosting providers also set upload size limits (commonly 2MB or 8MB).


Limitations and Known Issues

  • Block editor (Gutenberg): The REST API creates posts in classic HTML format. While this renders correctly, posts will not have Gutenberg block metadata. If your theme relies heavily on Gutenberg blocks, you may need to convert content to block format manually.
  • Page builders: Posts created via API will not work with Elementor, Divi, or other page builders. These store content in custom post meta that is not accessible through the standard REST API.
  • Plugin-specific fields: SEO plugins (Yoast, Rank Math) expose their fields through REST API, but you need to know the exact meta key names. OpenClaw supports Yoast and Rank Math out of the box; other SEO plugins may require custom configuration.
  • WordPress.com limitations: WordPress.com hosted sites have API rate limits and do not support application passwords on free or Personal plans. Business plan or higher is required.

For the official WordPress REST API docs, see developer.wordpress.org/rest-api.


Frequently Asked Questions

Does the integration work with WordPress.com and self-hosted WordPress?

Yes, with differences. Self-hosted WordPress (WordPress.org) uses the built-in REST API with application passwords. WordPress.com hosted sites use the WordPress.com REST API v2 with OAuth. The self-hosted option gives you more control and no API restrictions.

Can OpenClaw handle WordPress SEO automatically?

OpenClaw can generate SEO titles, meta descriptions, focus keywords, and alt text for images. If you use Yoast SEO or Rank Math, OpenClaw can update their custom fields through the REST API. However, it cannot access Yoast's readability analysis directly — that runs client-side in the WordPress editor.

Will OpenClaw publish content directly or save as drafts?

You control this in your configuration. By default, OpenClaw creates posts as drafts so you can review before publishing. You can change this to publish immediately, schedule for a future date, or use a custom workflow with a review step.

Can OpenClaw upload images to WordPress?

Yes. OpenClaw can upload images to the WordPress Media Library and set them as featured images or inline content images. It can also generate alt text and captions for uploaded images. File uploads are limited to the types allowed by your WordPress configuration.


Further Reading