Saturday, August 8, 2026

Automate WordPress Publishing with n8n Free Step-by-Step Guide 2025

WordPress powers 43.4% of all websites globally as of 2025, yet most creators still manually copy-paste content, format images, and hit "Publish" one post at a time. That workflow bleeds 5–10 hours weekly per site — time better spent on strategy or creation. Enter n8n, the source-available automation platform founded in Berlin by Jan Oberhauser in 2019, which now connects 400+ applications including WordPress via its native REST API nodes. Unlike Zapier (starts at $29.99/month) or Make ($9/month), n8n's self-hosted Community Edition costs $0 forever with unlimited executions. This guide shows you exactly how to build a free, production-grade pipeline that pulls content from Google Sheets, Airtable, or RSS feeds, transforms it with AI, and publishes to WordPress on schedule — no code, no monthly fees, no vendor lock-in.

Quick Answer: Install n8n locally via Docker or n8n.cloud free tier, add WordPress REST API credentials (Application Passwords), create a workflow with HTTP Request or WordPress nodes to POST to /wp-json/wp/v2/posts, map fields (title, content, status, categories, tags, featured media), schedule with Cron node, and test with a draft post — all in under 30 minutes using only free tiers.

Why Automate WordPress Publishing with n8n

Eliminate Manual Bottlenecks at Zero Cost

Manual publishing doesn't scale. A 2024 Content Marketing Institute survey found marketers spend 34% of their time on production tasks like formatting and scheduling. n8n's self-hosted edition removes the per-task pricing that makes Zapier expensive at volume — 10,000 monthly tasks cost $0 on n8n versus $73.50 on Zapier's Professional plan. Because n8n runs on your infrastructure (Docker, VPS, or even a Raspberry Pi), you own the data, control uptime, and avoid API rate limits imposed by SaaS middlemen.

Native WordPress REST API Integration

WordPress introduced its REST API in version 4.7 (December 2016), exposing endpoints like /wp-json/wp/v2/posts for programmatic CRUD operations. n8n ships with a dedicated WordPress node (added in n8n v0.150, 2022) that abstracts authentication, media uploads, and taxonomy handling. You can also use the generic HTTP Request node for custom endpoints (e.g., WooCommerce orders, Yoast SEO meta fields). Both approaches support Application Passwords — the secure, per-app credential method WordPress 5.6+ recommends over basic auth.

Real-World Example: Niche Affiliate Site Scales from 5 to 50 Posts/Week

A travel affiliate publisher migrated from manual drafting to an n8n pipeline: Google Sheets (content calendar) → OpenAI GPT-4o (draft generation) → WordPress node (publish as draft) → human review → scheduled publish. The workflow runs daily at 6 AM via Cron node. Result: 10x output increase with zero added headcount. The n8n instance runs on a $5/month DigitalOcean droplet (1 GB RAM, 1 vCPU) handling 200+ monthly executions.

Prerequisites and Setup

Self-Host n8n for Free (Docker, 5 Minutes)

  1. Provision a Linux VPS (DigitalOcean, Hetzner, Oracle Cloud Free Tier — 4 ARM cores, 24 GB RAM always free).
  2. Install Docker: curl -fsSL https://get.docker.com | sh.
  3. Run n8n: docker run -d --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n docker.n8n.io/n8nio/n8n.
  4. Access http://YOUR_IP:5678, set owner account, enable N8N_BASIC_AUTH_ACTIVE=true and N8N_BASIC_AUTH_USER/N8N_BASIC_AUTH_PASSWORD via environment variables for security.

Configure WordPress Application Passwords

  1. Log into WordPress admin → Users → Profile → Application Passwords (added in WP 5.6, December 2020).
  2. Name it "n8n-automation", copy the generated 24-character password (shown once).
  3. In n8n, create WordPress API credentials: Base URL = https://yoursite.com, Username = your WP username, Password = the Application Password.
  4. Test connection using the WordPress node's "Get All" operation on Posts — should return JSON array.

Prepare Content Source (Google Sheets, Airtable, or RSS)

Structure your source with columns: title, content_html, status (draft/publish/future), date_gmt (ISO 8601), categories (comma-separated IDs), tags (comma-separated IDs), featured_media_url. For Google Sheets, use n8n's Google Sheets node (OAuth2). For Airtable, use HTTP Request with Bearer token. For RSS, use RSS Feed Read node (built-in).

Build the Core Publishing Workflow

Step-by-Step Workflow Construction

  1. Trigger: Add Cron node → Every Day at 06:00 (or Interval node for every 15 minutes).
  2. Fetch Content: Add Google Sheets node → "Get Many" → Sheet ID, Range A2:H → Filter: status = "ready".
  3. Loop Items: Add Split In Batches node → Batch Size 1 (processes each row sequentially).
  4. Upload Featured Image (optional): HTTP Request → POST /wp-json/wp/v2/media with binary data from featured_media_url → Capture returned id.
  5. Create Post: WordPress node → Operation "Create" → Map fields: Title = {{$json.title}}, Content = {{$json.content_html}}, Status = {{$json.status}}, Date = {{$json.date_gmt}}, Categories = {{$json.categories.split(",").map(Number)}}, Tags = {{$json.tags.split(",").map(Number)}}, Featured Media = {{$json.featured_media_id}}.
  6. Update Source: Google Sheets node → "Update" → Set status = "published", post_id = {{$json.id}}, post_url = {{$json.link}}.
  7. Error Handling: Connect Error Trigger node → Slack/Email node for alerts.

Map Custom Fields and SEO Meta

Yoast SEO and Rank Math store meta in _yoast_wpseo_metadesc, _yoast_wpseo_focuskw, rank_math_title, etc. Use WordPress node's "Update" operation with meta parameter: {"_yoast_wpseo_metadesc": "Your 155-char description", "rank_math_focus_keyword": "target keyword"}. For ACF fields, use acf.field_name keys. Test with a single post via "Execute Node" before activating.

Real-World Example: Multi-Author Editorial Calendar

A B2B SaaS blog uses Airtable as editorial calendar: fields include Author (linked to Users table), SEO Keyword, Target Publish Date, Content Stage. n8n workflow: Airtable view "Ready to Publish" → HTTP Request to create post as draft → assigns author via author ID → sets Yoast meta → Slack notification to editor. Editor reviews in WP, clicks "Schedule". n8n second workflow (Webhook trigger from WP "publish_post" action) updates Airtable status to "Live" and logs URL. Zero manual handoffs.

Advanced Patterns: AI Enrichment, Multi-Site, and Conditional Logic

Inject AI-Generated Excerpts, Schema, and Translations

  1. After content fetch, add OpenAI node (or self-hosted Ollama for free) → System prompt: "Write a 160-character meta description for this article: {{content_html}}".
  2. Add second OpenAI node → Generate FAQPage JSON-LD schema from H2/H3 headings.
  3. Add third node → Translate content to Spanish/French via DeepL API (free tier 500k chars/month) → Create separate posts with lang parameter (requires Polylang/WPML).
  4. Map all outputs to WordPress node meta fields.

Publish to Multiple WordPress Sites from One n8n Instance

Create separate WordPress credential sets for each site (siteA.com, siteB.com). Use Switch node on site_id column from source → route to corresponding WordPress node. Each site can have different category/tag taxonomies; maintain a mapping table in n8n's Set node: {"siteA": {"cat_tech": 12}, "siteB": {"cat_tech": 45}}. This pattern powers PBN management, client site networks, and multilingual properties from a single $5 VPS.

Conditional Publishing: Draft vs. Schedule vs. Immediate

Use IF node on status field: draft → WordPress Create (status: draft); future → WordPress Create (status: future, date: date_gmt); publish → WordPress Create (status: publish). Add Wait node before publish branch for "human gate" — workflow pauses until manual "Continue" click in n8n UI or webhook approval from Slack/Telegram bot.

Comparison: n8n vs. Zapier vs. Make vs. WP All Import

Choosing the right automation layer depends on volume, budget, and technical comfort. Below compares the four most common approaches for WordPress publishing automation as of 2025.

All pricing reflects published monthly rates for equivalent 10,000-task throughput; n8n self-hosted costs only infrastructure ($5–20/month VPS).

Featuren8n (Self-Hosted)ZapierMake (formerly Integromat)WP All Import Pro
Monthly Cost (10k tasks)$5–20 (VPS only)$73.50 (Professional)$29 (Core plan)$199/year (flat)
WordPress Native NodesYes (WP node + HTTP)Yes (WP app)Yes (WP app)XML/CSV import only
Self-Hosted OptionYes (Docker, npm, binary)NoNoPlugin on your WP
AI/Code ExtensibilityJS/Python code nodes, OllamaCode step (limited)Custom functionsPHP snippets only
Multi-Site OrchestrationNative (Switch node)Separate Zaps per siteSeparate scenariosSeparate imports
Data OwnershipFull (your DB)Zapier stores logsMake stores logsYour WP database
Learning CurveMedium (visual + code)Low (guided)Medium (visual)Low (mapper UI)

Common Mistakes and Pro Fixes

Mistake 1: Using Basic Auth Instead of Application Passwords

Why It Hurts: Basic Auth sends username:password in every header; if intercepted, attacker gains full admin access. Application Passwords are revocable, scoped, and don't expose your main login.

Fix: Generate Application Password per integration (WP Admin → Profile → Application Passwords). Store in n8n credentials, not workflow JSON.

Mistake 2: Ignoring Rate Limits and Memory Constraints

Why It Hurts: WordPress REST API defaults to 100 requests/minute per IP (configurable via rest_api_default_limit filter). Bulk publishing 500 posts without throttling triggers 429 errors. n8n's default Node.js heap (512 MB) OOMs on large media uploads.

Fix: Add Throttle node (10 requests/10 seconds). Set NODE_OPTIONS=--max-old-space-size=2048 in Docker env. Use Split In Batches + Loop Over Items for large datasets.

Mistake 3: Hardcoding Category/Tag IDs Across Environments

Why It Hurts: Category ID 5 on dev is "News" but "Products" on prod. Workflow breaks when promoted.

Fix: Use Lookup table in n8n (Set node with JSON mapping) or fetch taxonomy via /wp-json/wp/v2/categories?search=tech dynamically. Store mapping in Google Sheets/Airtable synced per environment.

Mistake 4: Skipping Idempotency — Duplicate Posts on Re-run

Why It Hurts: Cron re-triggers, webhook double-fires, or manual re-execution creates identical posts. Google penalizes duplicate content.

Fix: Before Create, HTTP Request GET /wp-json/wp/v2/posts?search={{title}}. If results.length > 0, skip or update existing. Or store source_row_id + post_id in n8n's built-in Key-Value store (since v1.0) and check existence.

Mistake 5: No Observability — Silent Failures Go Unnoticed

Why It Hurts: Workflow runs "successfully" but post stays in draft because required field (e.g., featured_media) missing. No alert, content never publishes.

Fix: Enable Error Workflow on each node → dedicated workflow with Slack/Email/Telegram node. Add Respond to Webhook node with success/failure JSON for external monitoring (Uptime Kuma, Better Stack). Log execution IDs to Google Sheets for audit trail.

Pro Tips

  • Use n8n's "Execute Command" node to run WP-CLI on remote server via SSH for bulk operations (regenerate thumbnails, flush rewrite rules) that REST API doesn't support.
  • Version-control workflows via n8n's --workflows-folder flag pointing to a Git-synced directory; CI/CD deploys via GitHub Actions.
  • Leverage "Merge" node to combine content from multiple sources (RSS + Sheets + API) before single publish pass — eliminates duplicate workflows.
  • Cache API responses with n8n's Redis node (self-hosted) to avoid re-fetching unchanged content on every Cron run.
  • Test with "Draft" status first — add a Set node forcing status: "draft" during development; flip to expression {{$json.status}} only after QA.

FAQ

What is the WordPress REST API and why does n8n use it?

The WordPress REST API is a built-in interface (since WP 4.7, December 2016) that exposes site data — posts, pages, media, taxonomies — as JSON over HTTP. n8n's WordPress node wraps this API, handling authentication, pagination, and field mapping so you can create, read, update, or delete content without writing raw HTTP requests. It's the standard, future-proof way to automate WordPress programmatically.

How does n8n's free self-hosted edition compare to Zapier's free plan?

Zapier's free tier allows 100 tasks/month and single-step Zaps only. n8n self-hosted has no task limits, no step limits, and supports multi-step workflows, code nodes, and 400+ integrations at $0 software cost. You pay only for the VPS (~$5/month). For any serious volume, n8n is dramatically cheaper and more flexible.

Can I publish custom post types (e.g., WooCommerce products, portfolio items) with n8n?

Yes. The WordPress node supports any registered post type via the "Post Type" dropdown (custom types appear automatically). For WooCommerce products, map fields like price, sku, stock_status in the node's "Additional Fields" section. For ACF fields on any post type, use the meta parameter with acf.field_name keys.

Why do my scheduled posts publish immediately instead of at the future date?

WordPress requires the date_gmt field in UTC (ISO 8601, e.g., 2025-12-25T14:30:00) and status: "future". If your source date is local time or missing timezone, WP treats it as "now". Convert in n8n using DateTime node: {{$now.plus({days: 1}).setZone('UTC').toISO()}}. Also ensure WP cron is working (disable DISABLE_WP_CRON or set up system cron).

Will n8n automation break when WordPress or plugins update?

Core REST API endpoints are stable — WordPress maintains backward compatibility. However, plugin-specific meta keys (Yoast, Rank Math, ACF) can change between major versions. Pin plugin versions in composer.json or use WP-CLI to lock updates. Test workflows in staging after any WP core/plugin update. n8n itself updates monthly; read changelogs for breaking changes to WordPress node.

Conclusion

Automating WordPress publishing with n8n's free self-hosted edition gives you enterprise-grade content pipelines — multi-source ingestion, AI enrichment, multi-site orchestration, conditional logic, full observability — for the cost of a $5 VPS. You eliminate 5–10 hours of weekly manual work, avoid SaaS per-task fees that scale to hundreds monthly, and retain total data ownership. The key is starting small: one Cron → Google Sheets → WordPress draft workflow, then layer on image uploads, SEO meta, AI translations, and error alerts as you validate. Within a week you'll have a production system that publishes while you sleep, backed by infrastructure you control.

  • Self-host n8n on a $5 VPS — zero software cost, unlimited executions.
  • Use WordPress Application Passwords + native n8n WordPress node for secure, maintained integration.
  • Build idempotent, throttled workflows with error alerts to prevent duplicates and silent failures.
  • Extend with AI nodes (OpenAI/Ollama) for meta descriptions, schema, translations — all free tiers available.

Sources

Share:

0 comments:

Post a Comment