n8n WordPress Integration: HTTP Node Method (Real Developer Guide)

When I started building my automated blogging system on n8n, I did what every beginner does — I grabbed the official WordPress node and assumed it would just work. It didn’t. The built-in WordPress node kept breaking mid-workflow. Sometimes it would connect, sometimes it wouldn’t. I was a developer already working with WordPress daily, but this specific integration was giving me more headaches than I expected. After hours of research and multiple failed attempts, I found the solution that actually works: the HTTP Request Node + WordPress REST API method. And not just basic connection—I’m talking full control: publishing posts, uploading images, injecting Rank Math SEO fields, and storing data in Google Sheets, all automated. In this guide, I’m sharing exactly what I learned—including the mistakes, the errors, and the final setup that now runs my blog on autopilot.

What You’ll Learn Box
By the end of this tutorial, you’ll know how to:
Connect n8n to WordPress using the HTTP Request node (the reliable method). – Generate WordPress Application Passwords for secure API access – Create, publish, and update posts via WordPress REST API – Upload images to WordPress Media Library through n8n – Inject Rank Math SEO fields (focus keyword, meta description, SEO title) directly – Store published post data in Google Sheets automatically Who this plugin is for: WordPress developers and bloggers who want real automation — not just basic post creation.

Why NOT the Built-in WordPress Node

Why I Stopped Using n8n’s Built-in WordPress Node Let me be honest about something most tutorials skip. n8n has an official WordPress node. It looks clean, it’s easy to set up, and for simple tasks it works fine. But I ran into three problems that made it unreliable for a production blogging workflow:

1. It breaks unpredictably. Mid-workflow, the node would lose connection without any clear error message. This is a known issue in the n8n community

2. Limited field control. The official node lets you set title, content, and status—standard fields. When I needed to update the Rank Math SEO fields (focus keyword, meta description, custom SEO title), I found myself stuck. Those fields live in WordPress post meta, and the built-in node doesn’t expose them cleanly.




3. No image upload support. The official WordPress node cannot upload images to the Media Library. For my automated blog system where every post needs a featured image, this limitation was a dealbreaker.

The solution: Use n8n’s HTTP Request node to talk directly to the WordPress REST API. More setup upfront, but 100% control over everything. >

Note: I still use the official WordPress node for one thing — reading/fetching existing posts for internal linking. For that read-only job, it’s perfectly fine and easier. But for writing data to WordPress? HTTP Request Node, all the way.

Prerequisites + Application Password Setup

What You Need Before Starting: Tools Required: – n8n (cloud or self-hosted — both work) – WordPress site with admin access (self-hosted WordPress.org only — not WordPress.com) – WordPress version 5.6 or higher (Application Passwords built-in) Important: This method will NOT work on free or personal WordPress plans. You need a self-hosted WordPress installation where you have admin panel access.

Application Password Setup — Step by Step

Step 1 — Generate WordPress Application Password

Step 1:
Generate Your WordPress Application Password This is the most important step. Application passwords are a WordPress security feature—they let external tools like n8n connect to your site without using your main admin password.
Where to find it: 1. Log into your WordPress dashboard.
2. Go to Users → Your Profile (top right, or Users menu)
3. Scroll all the way down to the “Application Passwords” section.
4. In the “New Application Password Name” field, type: n8n Automation
5. Click “Add New Application Password.”
6. WordPress will show you a password like: xxxx xxxx xxxx xxxx xxxx xxxx
7. Copy this immediately—WordPress will never show it again [📸 Screenshot: WordPress Dashboard → Users → Profile → Application Passwords section] [📸 Screenshot: The generated Application password—spaces included, copy as-is Pro tip: The password has spaces in it — that’s normal. Please ensure you copy the entire password, including the spaces. N8 will handle it correctly. Your credentials are now:WordPress URL: https://your-site.comUsername: Your WordPress admin username – Password: The Application Password you just generated (NOT your login password)

Two Methods — Comparison

Two Ways to Connect n8n to WordPress (And Which One to Use) Before we go into setup, allow me to explain the two methods so you can choose what fits your use case. ###

Method 1:
Official WordPress Node (Simple) Use this method when you just want to read posts or do very basic publishing with default fields only.
✅ Easy to set up (5 minutes)
✅ No manual configuration needed
Breaks unpredictably in complex workflows
Cannot upload images
Cannot update post meta fields (Rank Math, custom fields)
Limited control over REST API calls ###

Method 2:

HTTP Request Node + REST API (Advanced — Recommended) Use this method when you need real automation—SEO fields,
Image uploads, custom metadata, and full control are included.
✅ 100% control over what gets sent to WordPress
✅ Can update ANY WordPress field, including Rank Math SEO data
✅ Image upload to media library works perfectly.
✅ Reliable — doesn’t break like the official node
✅ Works with any plugin’s custom fields
❌ Takes 15-20 minutes to set up initially. I use Method 2 for everything in my automated blog system. Let’s build it.

HTTP Node Setup — The Real Method

Step 2: Connect n8n to WordPress via HTTP Request Node. Now the main part. Please open your n8n workflow and proceed with the following steps. ### Setting Up Basic Authentication In your n8n workflow, add an HTTP request node. Before configuring the request itself, set up authentication:
1. In the HTTP Request node, find the “Authentication” field.
2. Select “Basic Auth” (not “Header Auth” or anything else)
3. For credentials, click “Create New.”
4. Enter: – Username: Your WordPress admin username – Password: The Application Password from Step 1 (with spaces)
5. Save the credential—name it. WordPress REST API [📸 Screenshot: n8n HTTP Request node — Authentication section with Basic Auth selected] ### Your First API Call — Test the Connection Let’s verify everything works.
with a simple GET request: URL: https://your-site.com/wp-json/wp/v2/posts?per_page=1 Method: GET Authentication: WordPress REST API (the credential you just created) Click “Execute Node”—you should see your WordPress posts data in JSON format. [📸 Screenshot: Successful test — JSON data from WordPress appearing in n8n] If you get a 401 Unauthorized error — scroll down to the Common Errors section. I’ve fixed this exact error multiple times. ### Creating a Post via HTTP Node Now the actual publishing. Change your HTTP request node to: Method: POST URL: https://your-site.com/wp-json/wp/v2/posts Body Content Type: JSON Body (raw JSON): json { "title": "Your Post Title Here", "content": "Your post HTML content goes here", "status": "draft", "categories": [1], "tags": [] } Set "status" to "draft" first—always test before publishing live. [📸 Screenshot: n8n HTTP Request node is configured for a POST request with a JSON body. 📸 Screenshot: Successful post creation—response shows post ID. After execution, check your WordPress dashboard → Posts → Drafts. Your post should be there!

Rank Math + Image Upload — The Advanced Stuff

Step 3: Inject Rank Math SEO Fields (The Real Reason to Use HTTP Node) This is why the HTTP method is worth it. Rank Math stores its SEO data in the WordPress post meta fields. Via the REST API, you can inject them directly. When creating or updating a post, add an object to your JSON body: json { "title": "Your Post Title", "content": "Your post HTML content", "status": "draft", "meta": { "rank_math_focus_keyword": "your focus keyword here", "rank_math_description": "Your custom meta description — 155 chars", "rank_math_title": "Your SEO Title for Google — 60 chars" } }
This is precisely what the official WordPress node cannot do. With the HTTP node, you’re talking directly to WordPress—anything that’s stored in post meta, you can set. [📸 Screenshot: n8n HTTP Request node — JSON body with meta fields visible] [📸 Screenshot: WordPress post editor — Rank Math sidebar showing the injected SEO data]
Result: Every automated post gets a perfect Rank Math setup—focus keyword, meta description, and SEO title—all without touching the WordPress editor. — ## Step 4: Upload Images to WordPress Media Library For featured images, the HTTP node handles the upload too. It’s a two-step process:
Step A — Upload the image file: Method: POST URL: https://your-site.com/wp-json/wp/v2/media Headers: Content-Disposition: attachment; filename="image-name.jpg" Content-Type: image/jpeg Body: Binary data of the image The request returns a media ID (e.g.).
Step B—Attach to post: Use the media ID when creating or updating your post. json { "title": "Post Title", "content": "Content here", "featured_media": 1234 } Done — your post has a featured image, set automatically. — ##
Step 5: Store Everything in Google Sheets After publishing, I add a Google Sheets node to log every post: – Post ID – Title – Published URL – Publish date – Focus keyword – Rank Math score (manually checked) This provides me a complete database of everything my automation has published. I also use this sheet for internal linking—when generating a new post, n8n fetches existing post titles and URLs to suggest related links. [📸 Screenshot: Google Sheets with logged post data from n8 n]

Common Errors — I Hit All of These

Common Errors I Hit (And How I Fixed Them) These are real errors from my actual setup process—not generic ones copied from the documentation. —
Error: 401 Unauthorized. This was my most common error. Two causes: Cause 1: Using your main WordPress login password instead of the application password. ✅ Fix: Go back to Users → Profile → Application Passwords. Generate a fresh one. Use that — not your login password. Cause 2: Application passwords might be disabled on your host. ✅ Fix: Add this to your wp-config.php
❌ Error: 403 Forbidden ✅ Fix: Your user role might not have publishing permission. ensure that your WordPress user has the Administrator role, not Editor or Contributor. —
❌ Error: REST API returns HTML instead of JSON ✅ Fix: Your WordPress REST API might be blocked by a security plugin (Wordfence, iThemes Security). Check: Visit your-site.com/wp-json/ in browser — if you see JSON, API is working. If you see an error page, review your security plugin settings and whitelist the REST API. —
❌ Error: Rank Math meta fields not saving ✅ Fix: Rank Math requires its REST API support to be enabled. Go to Rank Math → General Settings → REST API → Enable. Then try again. —
❌ The official WordPress node shows “Could not connect.” This is why I switched to the HTTP node. If you encounter this issue intermittently, consider switching to the HTTP node method, as it offers greater stability for production workflows.

Frequently Asked Questions

Does this work with WordPress.com?

No. WordPress.com (the hosted version) does not give you full REST API access or Application Passwords on free/personal plans. This method requires self-hosted WordPress.org where you have admin panel access.

Is the HTTP Request method better than the official WordPress node?

For production automation — yes. The official node is fine for simple, occasional tasks. But for a workflow that runs daily and needs to publish posts with SEO data, images, and custom meta fields, the HTTP Request method gives you reliability and full control.

Do I need any WordPress plugins for this?

No plugins required for basic post creation. For Rank Math SEO field injection, you need Rank Math installed and its REST API support enabled (Rank Math → General Settings → REST API).

Can I update existing posts with this method?

Yes. Use the PUT or PATCH method instead of POST, and add the post ID to the URL: https://your-site.com/wp-json/wp/v2/posts/{post_id}

Is my site secure using Application Passwords?

Yes — Application Passwords are designed for this exact use case. You can revoke them anytime from the WordPress Dashboard, and they never expose your main login credentials. Always use HTTPS on your site for full security.

Conclusion

Final Thoughts I spent hours debugging the official WordPress node before I found the HTTP Request method. Once I switched, everything clicked — reliable publishing, Rank Math SEO data injected automatically, images uploaded, and a Google Sheets log of everything. The extra 15 minutes of initial setup is absolutely worth it. If you’re building any kind of automated content system on n8n — blog automation, content pipelines, AI-generated posts — skip the official node for writing operations. Use HTTP Request + REST API. You’ll thank yourself later. Next up: In the next post, I’ll show you the complete AI blog automation workflow — how I use OpenAI to generate the article, inject it through this exact HTTP setup, and have a fully SEO-optimized draft ready in WordPress without touching the editor. Subscribe to the newsletter below to get notified when it goes live.Related Posts: – [n8n AI Agent Tutorial — Build Your First Agent] – [Python Automation Scripts for Beginners] – [How I Automate Google Sheets with Python]

Facebook
Twitter
LinkedIn

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top