Skip to main content

WordPress

WordPress Sync Engine - ContentMK Docs

Connect ContentMK to your WordPress sites for two-way content synchronization.

The WordPress Sync Engine is a core service built into ContentMK — not a module. It provides a unified WordPress REST API client that all WordPress-related modules share.

Connection Setup

To connect a site to WordPress, navigate to the site’s Sync page and provide:

  1. WordPress URL — Your site’s address (e.g., https://example.com)
  2. Username — Your WordPress username
  3. Application Password — A WordPress Application Password (available in WordPress 5.6+). Go to your WordPress dashboard under Users > Profile > Application Passwords to generate one.

Public posts can be read without credentials, but full sync (including drafts, private posts, and write operations) requires an Application Password.

Rate Limiting

The sync engine includes built-in rate limiting to avoid overwhelming your WordPress server. By default, it pauses for 300ms every 10 requests. You can adjust this in site settings if your server can handle more or needs longer pauses.

Sync State Tracking

Every synced entity has a per-field sync status:

StateMeaning
SyncedLocal and WordPress versions match
Local aheadYou’ve made changes in ContentMK that haven’t been pushed to WordPress
WP aheadThe WordPress version has been updated since the last sync
ConflictBoth sides have been modified since the last sync

Conflict detection uses modified-since timestamps to compare local and WordPress versions.

Field Selection

The sync engine uses the _fields= parameter on all GET requests to minimize payload size. Only the fields ContentMK actually needs are fetched from WordPress, reducing bandwidth and improving sync speed.

Silent Batch Mode

During bulk operations (like a full site sync), the engine uses silent batch mode — one summary notification at the end instead of per-item alerts. This keeps the UI clean during large imports.

Sync Page UI

The Sync page for each site shows:

  • Connection status — Whether the WordPress connection is active and healthy
  • Sync statistics — Total articles tracked, articles synced, local changes pending, and conflicts to resolve
  • Changelog timeline — A history of all sync changes (creates, updates, deletes) with the ability to revert individual changes

Manual Import Fallback

When WordPress sync isn’t available — for example, if the site has no REST API access or isn’t running WordPress — a collapsed section on the Sync page provides CSV and Sitemap import wizards as an alternative way to get content into ContentMK.