n8n

How to Automate WordPress Blog Publishing?

Publish a blog post to your site with one click. Content teams can move faster and keep formatting consistent across posts. Ideal for marketers who need a simple way to push drafts live without opening the site editor.

A manual trigger starts the run. The Settings node stores your site URL, username, application password, title, and body. A Code node builds a safe XML payload and escapes special characters. The HTTP Request node sends it to the xmlrpc.php endpoint with the correct text xml header. The XML node reads the reply, and the If node routes the result to a success or error path for clear outcomes. Two end nodes mark the final state for tracking.

Add your WordPress details, run a test on a draft, and confirm the response path. Expect faster publishing and fewer mistakes, saving about 15 to 20 minutes per post and reducing copy paste errors. Great for batch posts, internal news, and content calendars that need a quick push to go live.

What are the key features?

  • Manual trigger lets you publish on demand when content is ready
  • Settings node stores blog URL, username, application password, title, and content
  • Code node builds an XML request and escapes special characters
  • HTTP Request posts to xmlrpc.php with text xml headers
  • XML node parses the response into readable data
  • If node routes to success or error end points for clear results

What are the benefits?

  • Reduce manual posting time from 20 minutes to 2 minutes
  • Automate up to 90 percent of repetitive publish steps
  • Cut copy paste errors by about 95 percent with a single source of truth
  • Keep formatting consistent by using the same XML structure every time
  • Scale to handle many posts in a queue without extra effort

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with WordPress. See the Tools Required section above for links to create accounts with these services.
  3. In WordPress, create an Application Password for your user so you can authenticate programmatically. Make sure your user has permission to publish posts.
  4. Open the Settings node in n8n and fill in wordpressUrl without the protocol, your wordpressUsername, your wordpressApplicationPassword, and the post fields like title and content.
  5. Double click the PostRequest node. In the Credential to connect with field, click Create new credential. Choose HTTP Basic Auth, enter your WordPress username and the application password, and save. If you prefer inline auth, keep the existing setup and ensure the correct fields are used in the Code node.
  6. Confirm the PostRequest URL points to https://{{ $('Settings').item.json.wordpressUrl }}/xmlrpc.php and that Content Type is set to text xml. Verify the request body uses the xmlRequestBody from the Code node.
  7. Open the PrepareXML node and review the code so it maps the Settings fields to the XML payload. Ensure title and content map correctly and special characters are escaped.
  8. Run the workflow with the manual trigger. Check the HandleResponse node output to see the parsed response and then view the IsSuccessful branch to confirm the path taken.
  9. If you see an error, check common issues: status 401 means credentials are wrong, 404 means the URL is incorrect, and 403 may mean your host blocks xmlrpc.php. Update settings or allow access, then test again.
  10. After a successful test on a draft, switch the status field in Settings to publish if available in your XML template, and run again to post live.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

WordPress

Sign up

Free plan: $0 / mo (WordPress.com REST API supports creating posts)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.