Skip to content

Von WordPress zu Peacock migrieren

WordPress-Inhalte landen in Peacock per WP-REST-API-Import. Posts + Pages + Custom Post Types + Media-Library — alles wird zu Peacock-Stories + Assets.

Voraussetzungen

  • WordPress 5.0+ (REST API muss aktiv sein, ist Standard seit 4.7)
  • Application Password (Profil → Application Passwords → "Peacock- Import" anlegen)
  • Peacock-Tenant + Management-Token

CLI-Import

bash
npx @peacock/cli import wordpress \
  --wp-url https://meine-alte-seite.de \
  --wp-user admin \
  --wp-app-password "xxxx xxxx xxxx xxxx xxxx xxxx" \
  --peacock-base https://peacock-cms.webhoch.com \
  --peacock-token <management-token> \
  --peacock-space mein-space

Was wird wie gemappt

Posts → Stories (mit _component: "blog_post")

WordPressPeacock
post_titlecontent.headline
post_content (HTML)content.body (Rich-Text, DOMPurify-gefiltert)
post_excerptcontent.lead
post_dateStory-Version created_at
post_status: publishpublished_version_id gesetzt
post_status: draftStory angelegt, aber nicht publisht
slugslug
Featured Imagecontent.featured_image (Asset-UUID)

Pages → Stories (mit _component: "page")

Wie Posts, aber Tree-Hierarchie wird über post_parent rekonstruiert (WordPress-Parent-Page → Peacock parent_id).

Custom Post Types

Werden zu separaten ComponentBlueprints. CPT-Slug = Blueprint-Name. ACF-Felder werden auto-detected und in das Blueprint-Schema gemappt (text → string, image → asset-ref, etc.).

Media → Assets

  • Originale Bild-/Video-Files werden zu Peacock-Storage hochgeladen.
  • Alt-Texte (_wp_attachment_image_alt) wandern mit.
  • Image-Variants (thumbnail, medium, large) werden nicht importiert — Peacock generiert sie on-the-fly via Glide.
  • Inline <img> in Post-Content werden umgeschrieben auf die neuen Peacock-Asset-URLs.

Categories + Tags

Werden zu Peacock-Tags pro Story. Hierarchische Categories werden flach abgebildet (WP-Parent-Category geht verloren — Peacock hat flache Tags).

Was NICHT mitkommt

  • Comments — Peacock hat keine Kommentar-Funktion (war noch nie ein CMS-Kern-Feature).
  • WP-Users + Author — Story-Author-Tracking läuft in Peacock über das actor_token_id der Save-Aktion, nicht über einen separaten Author-Record.
  • Theme + Templates — Peacock ist headless. Deine alte WP-Theme bleibt unangetastet; entweder du baust ein neues Frontend (Astro, Next, etc.) oder behältst WP als Frontend (per wp peacock init- Plugin, das WP-PHP-Templates mit Peacock-Calls anreichert).

WP-Plugin als Übergangslösung

Wenn du WordPress als Frontend behalten willst (z.B. bestehendes Theme, Plugins, SEO-Setup):

bash
wp plugin install peacock-cms --activate
wp peacock init

Dann in deinen WP-Templates:

php
<?php echo peacock_block('homepage-hero'); ?>

Der Block wird zur Render-Zeit aus Peacock geholt und in dein WP- Template injiziert. Vorteile: alle Plugins + Themes weiter aktiv, aber Inhalt kommt jetzt aus Peacock. Migration kann schrittweise laufen.

Idempotenz

Wie beim Storyblok-Importer: Re-Run aktualisiert Stories (verwendet slug + lang als Schlüssel) — keine Duplikate.

Siehe auch