N8n Wordpress

Describe the problem/error/question

I have an n8n workflow that creates a post with an image and then posts them to Worpress using HTTP Post requests. It upload the image and post separately. It had been working fine for about a week and then I strted getting an error most of the time. It still workd occasionally.

What is the error message (if any)?

The connection to the server was closed unexpectedly, perhaps it is offline. You can retry the request immediately or wait and retry later.

Please share your workflow

Share the output returned by the last node

[
{
“error”:
{
“message”:
“The connection to the server was closed unexpectedly, perhaps it is offline. You can retry the request immediately or wait and retry later.”,
“timestamp”:
1760083298527,
“name”:
“NodeApiError”,
“context”:
{
}
}
}
]

Information on your n8n setup

  • n8n version: [email protected]
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system:
1 Like

Hi there!

If it is working occasionally, it sounds like a hosting related issue. Are you monitoring downtime of your WP site or the server where it is hosted?

To troubleshoot further, I suggest installing REST API Logging plugin on the site to see if the request is reaching or not.

You can try this plugin: REST API Log – WordPress plugin | WordPress.org

1 Like

the error is from wordpress correct? have you WaFF/Firewall server side or security firewall plugin ?

Thanks for your replys.

I don’t have a firewall plugin and there is not a firewall on the server.

I installed REST API log and then ran a workflow to POST 5 images and 5 posts.

REST API logged 1 image and 1 post.

I have been chasing Hostinger for days for the logs from their end but I can’t get anything out of them.

try this direct in wordpress REST API Route Tester – WordPress plugin | WordPress.org

I’m embaressed to admit this but I will own up to the answer in case it helps anyone else in this situation.

I was just setting things up and running on a temparay domain from Hostinger. In my defense I would have thought Hostinger would realise the problem but they didn’t.

Once I connected my actual domain it all worked perfectly.

Thanks for the responses.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.