Wordpress Integration

Wordpress Integration

Wordpress Integration

Connect your WordPress site to Wrodium for seamless content optimization and publishing.

Created date:

Dec 5, 2025

Updated date:

Dec 11, 2025

Prerequisites

  • WordPress 5.6 or later

  • REST API enabled (enabled by default)

  • Application Passwords feature (WordPress 5.6+)

  • Admin or Editor access to your WordPress site

Setup Steps

Step 1: Generate an Application Password

  1. Log into your WordPress admin panel

  2. Navigate to Users → Profile

  3. Scroll to Application Passwords

  4. Enter a name (e.g., "Wrodium Integration")

  5. Click Add New Application Password

  6. Copy the generated password immediately (it won't be shown again)

Note: Application Passwords look like xxxx xxxx xxxx xxxx xxxx xxxx with spaces. Include the spaces when entering in Wrodium.

Step 2: Configure Wrodium

  1. Go to Settings → CMS Connection in Wrodium

  2. Select WordPress as your provider

  3. Enter the following:

Field

Value

Example

Base URL

Your WordPress site URL

https://yourblog.com

Username

Your WordPress username

admin

Application Password

The password from Step 1

xxxx xxxx xxxx xxxx

  1. Click Test Connection to verify

  2. Click Save Configuration

Configuration Schema

{
  "provider": "wordpress",
  "provider_config": {
    "base_url": "https://your-wordpress-site.com",
    "username": "your-username",
    "application_password": "xxxx xxxx xxxx xxxx xxxx xxxx"
  }
}

API Behavior

Listing Articles

Wrodium fetches posts via:

Returned fields:

  • id → Article ID

  • title.rendered → Post title (HTML stripped)

  • excerpt.rendered → Post excerpt

  • content.rendered → Full content (used for word count)

  • date → Publication date

  • status → Post status (publish, draft, etc.)

  • link → Public URL

Updating Articles

Wrodium updates posts via:

Supported update fields:

  • title → New title

  • content → New HTML content

  • excerpt → New excerpt

  • slug → New URL slug

  • status → Set to "publish" to publish

Permissions Required

The WordPress user needs the following capabilities:

  • edit_posts → To update content

  • publish_posts → To publish content

  • read → To list articles

For full functionality, we recommend using an Editor or Administrator role.

Advanced: Custom Post Types

To work with custom post types, add the post type to your configuration:

{
  "provider": "wordpress",
  "provider_config": {
    "base_url": "https://your-site.com",
    "username": "your-username",
    "application_password": "xxxx xxxx xxxx xxxx",
    "post_type": "your_custom_type"
  }
}

Troubleshooting

"401 Unauthorized" Error

  • Verify your username is correct (not email)

  • Ensure the Application Password was copied with spaces

  • Check that Application Passwords are enabled (some security plugins disable them)

"403 Forbidden" Error

  • Your user may lack sufficient permissions

  • Check if a security plugin is blocking REST API access

  • Verify /wp-json/ endpoint is accessible

"404 Not Found" Error

  • Ensure your Base URL doesn't include /wp-json/

  • Verify pretty permalinks are enabled in WordPress

REST API Blocked

Some hosts or security plugins block the REST API. To check:

If blocked, whitelist Wrodium's IPs or use our webhook integration instead.

Code Example

Here's how the WordPress client works under the hood:

import httpx

class WordPressClient:
    def __init__(self, base_url: str, username: str, password: str):
        self.base_url = base_url.rstrip("/")
        self.auth = (username, password)
    
    async def list_articles(self, limit: int = 20):
        url = f"{self.base_url}/wp-json/wp/v2/posts"
        params = {
            "status": "publish",
            "per_page": limit,
            "orderby": "date",
            "order": "desc",
        }
        async with httpx.AsyncClient(timeout=15) as client:
            resp = await client.get(url, params=params, auth=self.auth)
            resp.raise_for_status()
        return resp.json()
    
    async def update_article(self, article_id: str, content: dict):
        url = f"{self.base_url}/wp-json/wp/v2/posts/{article_id}"
        async with httpx.AsyncClient(timeout=15) as client:
            resp = await client.post(url, json=content, auth=self.auth)
            resp.raise_for_status()
        return resp.json()

Next Steps

Found this article insightful? Spread the words on…

Found this article insightful?
Spread the words on…

X.com

Share on X

X.com

Share on X

X.com

Share on X

X.com

Share on LinkedIn

X.com

Share on LinkedIn

X.com

Share on LinkedIn

Found this documentation insightful? Share it on…

X.com

LinkedIn

Contents

Checkout other documentations

Checkout other documentations

Checkout other documentations

Let us help you win on

ChatGPT

Let us help you win on

ChatGPT

Let us help you win on

ChatGPT