How to Connect n8n to WordPress: Automate Content Publishing (2025)

WordPress still powers a huge share of the web, and it has a clean REST API — which makes it a perfect target for n8n automation. Whether you want to auto-publish AI-drafted articles, sync content from Notion, or schedule posts from a spreadsheet, n8n can drive your WordPress site without you ever opening the admin dashboard.

This guide covers authentication with application passwords, creating and updating posts, handling featured images, and wiring up a full content pipeline.

Why automate WordPress with n8n

Manual publishing is a bottleneck: formatting, categories, tags, featured image, SEO fields, then hitting publish — every single time. With n8n you can:

  • Auto-publish articles the moment an AI drafting workflow finishes.
  • Bulk-import posts from Google Sheets, Airtable, or a CSV.
  • Cross-post content from Notion or a headless CMS.
  • Schedule and drip-publish a content backlog automatically.

Step 1 — Create a WordPress application password

Modern WordPress (5.6+) ships with application passwords, which are far safer than using your admin login:

  1. In WordPress, go to Users → Profile.
  2. Scroll to Application Passwords, enter a name like n8n, and click Add New.
  3. Copy the generated password (with spaces) — you won't see it again.

This ties automation access to a specific user and can be revoked without changing your main password.

Step 2 — Add the WordPress credential in n8n

Open Credentials → New → WordPress API. Enter your site URL (e.g. https://yourblog.com), your WordPress username, and the application password. n8n uses basic auth over HTTPS against the /wp-json/wp/v2/ REST endpoints. Save and test — a green check means you're connected.

If the test fails, confirm the REST API isn't blocked by a security plugin and that your permalinks aren't set to Plain.

🚀 Turn one keyword into a published article in under 5 minutes

This SEO Content Machine handles research, drafting, and auto-publishing to WordPress end to end — the exact pipeline pattern described above, ready to import.

Get the SEO Content Machine template →

Step 3 — Create and update posts

Add a WordPress node, choose resource Post, operation Create. Map your fields: title, content (HTML), status (draft or publish), plus categories and tags by ID. To set a featured image, first upload the media with an HTTP Request node to /wp-json/wp/v2/media, capture the returned ID, and pass it as featured_media.

For updates, switch the operation to Update and supply the post ID — perfect for refreshing old articles or fixing metadata in bulk.

Step 4 — Build an AI content pipeline

Here's where it gets powerful. Chain nodes into an end-to-end pipeline: a keyword trigger → an AI node that researches and drafts the article → a formatting step that converts to clean HTML → the WordPress node that publishes it → a notification that posts the live URL to Slack. The whole loop can run in under five minutes with zero human touch.

Add a quality gate — publish as draft first, and only flip to publish after an editor approves via a Teams or Telegram button — to keep AI content on-brand.

Troubleshooting the WordPress connection

  • 401 Unauthorized — application password copied with a typo, or the user lacks publishing rights.
  • REST endpoint 404 — a plugin disabled the REST API; whitelist /wp-json/.
  • Content stripped on publish — WordPress sanitizes unsafe HTML; use allowed tags or the Gutenberg block format.
  • Category not applied — categories must be passed by numeric ID, not name.

Putting your content on autopilot

Once the application-password credential is set, WordPress becomes just another endpoint n8n can write to. The real leverage comes from what you connect upstream — AI drafting, a content calendar, or a headless source — so publishing stops being a manual chore and becomes the last step of an automated pipeline.

Start by automating a single repetitive publishing task, verify the output quality, then scale to a full keyword-to-published workflow.


Ready to automate? Get this n8n template on Gumroad

Get the SEO Content Machine — a complete n8n workflow that researches, writes, and publishes SEO articles to WordPress automatically.

Get the template on Gumroad →