Validate AI-Generated Gutenberg Block Markup Before Insert: parse_blocks, Allowlist and Fallback
Stop LLM block markup from corrupting post_content. Parse the tree, reject unknown blocks and raw HTML, sanitise attributes against block.json, diff the…
Read tutorial
Topic
WordPress & AI
Practical tutorials for adding AI to WordPress safely: LLM clients, embeddings and search, editor tools, moderation, and keeping API keys and personal data protected.
Validate AI-Generated Gutenberg Block Markup Before Insert: parse_blocks, Allowlist and Fallback
Stop LLM block markup from corrupting post_content. Parse the tree, reject unknown blocks and raw HTML, sanitise attributes against block.json, diff the…
Read tutorial
Build a Streaming WordPress AI Chat Assistant: SSE Endpoint, Conversation Table and Per-User Rate Limits
Build a secure WordPress AI chat plugin with a nonce-protected REST endpoint, SSE streaming, a custom conversation table, per-user/IP rate limits and…
Read tutorial
AI Content Provenance for WordPress: Log Model, Prompt Hash and Token Usage per Post with a Review Diff
Log the model, prompt hash, token counts and reviewing user for every AI-assisted post, then audit the change per post with a…
Read tutorial
Encrypt WordPress AI Plugin API Keys at Rest with Sodium: Capability-Gated Decryption and Key Rotation
Store AI provider keys as sodium_crypto_secretbox ciphertext sealed by your wp-config salts, decrypt only behind manage_options, and rotate keys with WP-CLI.
Read tutorial
AI Translation Workflow for WordPress Posts: Glossary-Aware LLM Drafts with Human Review and Locale Linking
Build a glossary-aware LLM translation pipeline for WordPress: block chunking, strict JSON schema, source hashing, draft creation and portable locale linking.
Read tutorial
AI Internal Linking Suggestions in Gutenberg: Embedding Similar Posts with Human-Approved Insert
Build a Gutenberg sidebar that compares post embeddings over a capability-checked REST endpoint, surfaces five internal link candidates, and inserts only on…
Read tutorial