IANews
GuidesPublishing

Publish to WordPress

Connect IANews to WordPress and publish articles automatically via the REST API v2.

Publish to WordPress

Connect IANews to your WordPress site to publish articles directly via the REST API v2. This guide covers credential setup, connection configuration, category mapping, and troubleshooting.

Prerequisites

  • WordPress 5.0 or later with the REST API enabled (enabled by default)
  • An administrator or editor account on your WordPress site
  • HTTPS enabled on your WordPress domain

Connect your WordPress site

Generate an Application Password in WordPress

In your WordPress admin dashboard, go to Users -- Profile. Scroll down to the Application Passwords section. Enter the name IANews and click Add New Application Password. Copy the generated password immediately -- it is shown only once.

Always use an Application Password, never your regular WordPress login password. Application Passwords are revocable and do not expose your main credentials.

Open the connection settings in IANews

In IANews, navigate to Sites -- select your site -- Connections -- WordPress.

Enter your credentials

Fill in the following fields:

FieldExample
WordPress URLhttps://myblog.com
UsernameYour WordPress admin username (case-sensitive)
Application PasswordThe password generated in step 1

Test the connection

Click Test Connection. IANews sends a lightweight request to /wp-json/wp/v2/posts to verify REST API access and credential validity. A green confirmation appears on success.

Configure mappings and defaults

Set your preferred publishing behavior:

  • Default category -- The WordPress category assigned to new posts
  • Tag sync -- Map IANews categories to WordPress tags automatically
  • Featured image -- Upload the article image as a WordPress media attachment and set it as the featured image
  • Post status -- draft (review before publishing) or publish (go live immediately)

Save the connection

Click Save. Your WordPress connection is now active and ready for publishing.

How the REST API call works

When you publish an article, IANews creates a WordPress post via the REST API v2. Here is what the request looks like:

curl -X POST "https://myblog.com/wp-json/wp/v2/posts" \
  -u "admin:xxxx xxxx xxxx xxxx xxxx xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "AI Adoption Accelerates in European Newsrooms",
    "content": "<p><em>Introduction paragraph...</em></p><h2>Section</h2><p>Body...</p>",
    "slug": "ai-adoption-accelerates-european-newsrooms",
    "status": "publish",
    "excerpt": "A brief summary of the article...",
    "featured_media": 42,
    "meta": {
      "description": "SEO meta description",
      "keywords": "ai,journalism,europe"
    }
  }'

A successful response returns HTTP 201 Created with the post permalink in the link field.

Category mapping

IANews maps its internal categories to WordPress categories. You have two options:

  • Auto-create -- IANews creates WordPress categories that do not yet exist
  • Map to existing -- Select an existing WordPress category for each IANews category in the Publishing settings

Troubleshooting

Some security plugins (Wordfence, iThemes Security) disable the REST API. Verify by running:

curl -I https://yoursite.com/wp-json/wp/v2/posts

If you receive a 404 or 403, re-enable the REST API in your security plugin settings or whitelist the IANews server IP address. Also confirm that pretty permalinks are enabled in Settings -- Permalinks.

Automatic error recovery

The WordPress adapter includes built-in automatic error recovery. If several consecutive publish attempts fail, publishing is temporarily paused and requests are queued and retried automatically once the connection recovers. You can monitor connection status in Sites -- Connections -- Status.

Auto-publish from briefs

To publish articles automatically when a scheduled brief completes, enable the Auto-Publish toggle in Sites -- Settings. Articles generated from that brief are sent to WordPress without manual intervention.

What's next?

  • Ghost CMS -- Connect to Ghost as an alternative CMS target
  • Webhooks -- Set up event-driven notifications when articles are published
  • NextJS Direct -- Publish directly to a Next.js site via database insert