Skip to main content
Technology & EngineeringCms Services90 lines

WordPress Content API Workflow

Read, create and verify WordPress posts and pages through the REST API. Use for WordPress content integration, draft publishing workflows, pagination and revision-aware updates. Distinguish self-hosted WordPress from WordPress.com, retain publication approvals, and verify the exact resource after a write.

Quick Summary17 lines
Build a small, inspectable content integration for the actual WordPress site.
The result is a reconciled content change and a credential-free receipt, not
merely an HTTP success message. WooCommerce products and orders use a different
API; route those tasks to the commerce skill.

## Key Points

1. Retrieve the exact post or page by ID when one is supplied. If searching,
2. Paginate listings using the endpoint's documented page contract and response
3. Capture the current modification time, status, content and relevant taxonomy
4. Prepare the smallest content payload. Resolve categories, tags, author and
- [WordPress REST posts reference](https://developer.wordpress.org/rest-api/reference/posts/)
- [WordPress application passwords](https://developer.wordpress.org/advanced-administration/security/application-passwords/)
- [WordPress.com REST API URLs by site type](https://developer.wordpress.com/docs/rest-api-urls-by-site-type/)
- [WordPress.com REST API authentication and site-scoped examples](https://developer.wordpress.com/docs/api/getting-started/)
skilldb get cms-services-skills/wordpress-content-api-workflowFull skill: 90 lines
Paste into your CLAUDE.md or agent config

WordPress Content API Workflow

Build a small, inspectable content integration for the actual WordPress site. The result is a reconciled content change and a credential-free receipt, not merely an HTTP success message. WooCommerce products and orders use a different API; route those tasks to the commerce skill.

Establish the contract

Identify the site URL, whether it is self-hosted or WordPress.com, the requested resource type, and the exact content change. Read the actual REST index or hosted API reference and available namespaces before constructing requests. A hosted site can use a site-scoped route on public-api.wordpress.com, and some hosted configurations also expose /wp-json/. Verify the chosen site and endpoint. Do not send a self-hosted application password to a WordPress.com OAuth endpoint or an unrelated host. Use only the approved credential for the chosen host and authentication flow. Inspect redirects before attaching authorization headers.

Use an existing approved credential with the narrowest applicable user role. An application password inherits that user's capabilities; it is not a separate per-post permission grant. Keep it in the configured secret store and use HTTPS. Never put credentials in query parameters, example files or receipts. A request to edit a draft does not authorize publication, email distribution, plugin installation, or a change of the site's user roles.

Read and prepare

  1. Retrieve the exact post or page by ID when one is supplied. If searching, show the matching title, slug and ID before choosing among ambiguous results.
  2. Paginate listings using the endpoint's documented page contract and response headers. Record completion separately from a first-page result. Handle 401, 403, 404 and 429 as different outcomes; an error is not an empty library.
  3. Capture the current modification time, status, content and relevant taxonomy IDs. Preserve a local backup of the affected content. Rendered HTML is not necessarily the original editable block representation: use authorized edit context when supported and preserve block markup rather than reconstructing it from screenshots.
  4. Prepare the smallest content payload. Resolve categories, tags, author and media to actual IDs; do not invent IDs or reuse those from a different site. Check alternative text and image rights before attaching media.

Apply the intended change

For a new draft, explicitly send status: "draft" to the site's posts or pages endpoint. For an update, address the verified ID and send only the changed fields. Re-read the modification time immediately before changing existing content. If it changed, reconcile the intervening edit; do not overwrite it. This comparison reduces accidental conflicts but is not an atomic lock.

Publication requires the existing task's publication authority. When scheduling is authorized, resolve the site's timezone and the intended instant, then check the stored local and GMT fields together. A saved future status is evidence of scheduling, not proof the post has already become public.

After a timeout, first retrieve the known resource or reconcile a unique local operation marker. Do not blindly repeat a create request. If no safe identity can be established, report the uncertain result and leave a recovery checkpoint.

Verify and hand off

Read the resulting ID again, comparing status, slug, title, body and modified time with the prepared change. Preview the rendered page with the intended viewer permissions; check formatting, links, images and responsive layout. Distinguish authenticated preview from anonymous publication. Record the site, resource ID, before/after status, verified fields, time and remaining limitation.

Test two cases in an isolated site or transport fixture: a draft update retains draft status and unrelated fields; a forbidden response or concurrent edit prevents a claimed successful update. A fixture validates integration behavior, not that a real site's plugins, cache or publishing schedule work.

References

Original SkillDB-authored procedure. References checked 2026-11-13; no upstream skill body is copied. Rights: LicenseRef-SkillDB-Content.

Install this skill directly: skilldb add cms-services-skills

Get CLI access →

Related Skills

Builder Io

Builder.io is a Visual Headless CMS and API that empowers developers to integrate a drag-and-drop page builder and content management system into any web application. Use this skill when you need a powerful visual editor for marketing and content teams, A/B testing, personalization, and a flexible content API for dynamic web experiences.

Cms Services•138L

Caisy

caisy is a headless CMS designed for speed and scalability, empowering developers to deliver exceptional digital experiences. Use caisy when you need a performant, API-first content platform with strong developer tools, a focus on speed, and a GraphQL-native approach.

Cms Services•249L

Contentful

Build with Contentful for headless content management. Use this skill when the project needs Contentful integration for content models, REST or GraphQL APIs, rich text rendering, localization, webhooks, environment management, or Next.js SDK usage. Covers the full Contentful developer workflow.

Cms Services•359L

Cosmic

Integrate Cosmic as your headless content management system, providing a flexible and scalable solution for managing digital content across websites, mobile apps, and other digital experiences. Use Cosmic when you need a powerful API-first CMS with robust media management, localization, and customizable content models.

Cms Services•181L

Directus

Build with Directus for database-first content management. Use this skill when the project needs Directus integration for wrapping existing SQL databases with REST and GraphQL APIs, building admin dashboards, configuring flows and automations, managing roles and permissions, or connecting any SQL database as a headless CMS.

Cms Services•464L

Ghost

Integrate Ghost as a powerful headless CMS or a full-featured publishing platform. Use this skill when you need a content-focused solution for blogs, newsletters, membership sites, or any web application requiring robust content management and a streamlined editorial experience.

Cms Services•254L