Skip to content

WordPress

The Orimora Sync WordPress plugin imports the published documents of a shared folder into WordPress as posts or pages. It is a pull / browse-import integration: WordPress calls Orimora with a read-only folder-share token, you browse the folder in the admin, and import the documents you pick as drafts. Orimora stays the source of truth for title + body; WordPress owns slug, publish status, SEO and image tweaks.

Orimora (folder share) ──GET /api/v1/documents?format=markdown (Bearer kb_…)──▶ WordPress (browse → import draft)
  1. In Orimora, open a collection’s menu (kebab or right-click) → “Connect to a service”, target CMS. This mints a read-only, published-only folder-share token (kb_…) scoped to that one folder.
  2. In WordPress → Settings → Orimora Sync, paste the Orimora URL and the token, and configure the per-collection mapping (target post type / status / taxonomy).
  3. Go to Tools → Orimora Import: browse the shared folder’s published documents, select the ones you want, and import as drafts. Markdown becomes native Gutenberg blocks; images are sideloaded into the media library (no hotlinking); Mermaid diagrams render from a locally bundled script (no CDN).
  4. Re-import a document that shows “newer version available”: it replaces title + body only — your slug, status, SEO and image edits are kept.

This is the contract that makes re-imports safe:

OwnsFields
Orimora (source)Title, body
WordPress (destination)Slug, publish status, SEO, image tweaks
  • First import: title + body + an initial slug, created as a draft.
  • Re-import: title + body only — everything the editor set is left untouched. Re-import is always explicit and warned (a confirm dialog), because it overwrites your local body edits.
Terminal window
git clone https://github.com/Orimora-app/orimora-wordpress-importer
cd orimora-wordpress-importer
composer install # league/commonmark + dev tools (vendor/ is gitignored)
# then symlink or copy this directory into wp-content/plugins/orimora-sync

Configure the connection in Settings → Orimora Sync. The token is stored in an autoload=no option. Operators who prefer to keep secrets out of the database can pin them in wp-config.php (these override the stored values):

define( 'ORIMORA_SYNC_BASE_URL', 'https://wiki.example.com' );
define( 'ORIMORA_SYNC_TOKEN', 'kb_…' );
  • No inbound endpoint. The trust boundary is outbound: the plugin only calls Orimora with the folder-share token over the WordPress HTTP API. The token is read-only + published-only (enforced server-side), so it can neither write to Orimora nor expose drafts.
  • The token is never logged or rendered. Admin actions are nonce- and capability-guarded — saving the connection needs manage_options; browsing/importing needs edit_posts.
  • One folder share per site (multiple token sources are planned for v2).
  • Mapping UI is a JSON textarea (a richer table is planned).
  • Import is synchronous in the admin request (large folders → v2 moves the upsert + image sideload to Action Scheduler).
  • Re-importing an image creates a new media file in WordPress (the old one is orphaned — a WordPress quirk, since it has no in-place replace). v2 adds a cleanup helper.