🚀 Content-Automatisierung für Ihr Business?
Vereinbaren Sie ein unverbindliches Strategiegespräch
📊 Business Value
WordPress ist das weltweit führende CMS, aber manuelle Beitragserstellung skaliert nicht. Dieses Python-Tool automatisiert den kompletten Publishing-Workflow über die WordPress REST API – inklusive HTML-Content, Kategorien und Status-Management (draft/publish).
⚙️ WordPress REST API – Datenfluss
Auth Setup
Application Password im WP-Backend generieren: Benutzer → Sicherheit → Application Passwords. 24-stelliger Token.
API-Call
HTTP Basic Auth via requests.auth.HTTPBasicAuth(username, app_password) an /wp-json/wp/v2/posts
Content Payload
JSON mit title, content (HTML), status (draft/publish), categories (ID-Array), tags – alles WP-native Felder.
Response
HTTP 201 Created + JSON mit post ID, permalink, status, date. Beitrag sofort im Admin-Panel einsehbar.
💻 Technische Details
Die Lösung nutzt ausschließlich die Standardbibliothek requests – keine WordPress-spezifischen SDKs.
Getestet mit WordPress 6.x auf verkooyen.org, kompatibel mit jeder WP-Installation ab Version 5.6.
requests + requests.auth.HTTPBasicAuth. Keine externen oder WP-spezifischen Libraries.POST (create), GET (read), PUT (update), DELETE – alles über wp-json.📝 Code-Snippets aus der Praxis
WordPress Beitrag per REST API mit Application Password
import requests
from requests.auth import HTTPBasicAuth
WP_URL = "https://verkooyen.org"
USER = "verkooyen"
APP_PW = "XXXX XXXX XXXX XXXX XXXX XXXX"
auth = HTTPBasicAuth(USER, APP_PW)
post = {
'title': 'Mein automatisierter Beitrag',
'content': '<h2>Willkommen</h2><p>Automatisch erstellt via REST API.</p>',
'status': 'draft' # 'publish' für sofort live
}
r = requests.post(
f"{WP_URL}/wp-json/wp/v2/posts",
auth=auth,
headers={'Content-Type': 'application/json'},
json=post
)
if r.status_code == 201:
data = r.json()
print(f"✅ ID: {data['id']} | Link: {data['link']}")
else:
print(f"❌ {r.status_code}: {r.text}")
Mit Kategorien, Tags und Featured Image
# Kategorien & Tags aus API laden
cats = requests.get(f"{WP_URL}/wp-json/wp/v2/categories", auth=auth)
print([(c['id'], c['name']) for c in cats.json()])
post = {
'title': 'Windows 10 Tutorial: Desktopsymbole verwalten',
'content': '<h2>Einleitung</h2><ol><li>Rechtsklick Desktop</li></ol>',
'status': 'draft',
'categories': [12], # Kategorie-ID aus obiger Abfrage
'tags': [5, 8], # Tag-IDs
'featured_media': 42 # Medien-ID aus Media Library
}
Bulk-Import aus JSON-Datei
import json
with open("posts.json", "r", encoding="utf-8") as f:
posts = json.load(f)
for i, post in enumerate(posts, 1):
r = requests.post(
f"{WP_URL}/wp-json/wp/v2/posts",
auth=auth,
json={
'title': post['title'],
'content': post['content'],
'status': 'draft'
}
)
ok = "✅" if r.status_code == 201 else "❌"
print(f"[{i}/{len(posts)}] {ok} {post['title'][:60]}")
🚀 WordPress-Automatisierung in Stunden einsatzbereit
🎯 Strategische Erkenntnisse
KI + WordPress = Content-Maschine
LLM generiert strukturierten HTML-Content → Skript erstellt WP-Beitrag als Draft → Redakteur prüft und veröffentlicht.
Der Mensch kuratiert, die Maschine produziert.
App Passwords > XML-RPC
REST API mit Application Passwords ist der moderne, sichere Weg. XML-RPC wurde in vielen Installationen bereits deaktiviert – zurecht.
XML-RPC abschalten, REST API mit App Passwords nutzen.
Universelle Content-Migration
Joomla → WordPress, statisches HTML → CMS, beliebige Datenquelle → WP. Die REST API ist der universelle Content-Adapter.
Jedes Format → JSON → WordPress API → fertig.
WordPress-Automatisierung für Ihr Unternehmen?
Ob Content-Migration, automatisierte Blog-Posts oder KI-generierter Content mit WordPress-Integration – ich baue die Pipeline von der Idee zum veröffentlichten Beitrag.