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)How it works
Section titled “How it works”- 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. - In WordPress → Settings → Orimora Sync, paste the Orimora URL and the token, and configure the per-collection mapping (target post type / status / taxonomy).
- 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).
- Re-import a document that shows “newer version available”: it replaces title + body only — your slug, status, SEO and image edits are kept.
Field ownership
Section titled “Field ownership”This is the contract that makes re-imports safe:
| Owns | Fields |
|---|---|
| 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.
Install (from source)
Section titled “Install (from source)”git clone https://github.com/Orimora-app/orimora-wordpress-importercd orimora-wordpress-importercomposer install # league/commonmark + dev tools (vendor/ is gitignored)# then symlink or copy this directory into wp-content/plugins/orimora-syncConfigure 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_…' );Security
Section titled “Security”- 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 needsedit_posts.
v1 limits (by design)
Section titled “v1 limits (by design)”- 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.
See also
Section titled “See also”- Static sites via Pull-API — the same folder share, consumed by a static-site generator instead
- Kirby — the same browse-import pattern for Kirby
- REST API overview — the Pull-API the plugin consumes
- Permissions & groups — the Share folder capability that mints the token