Hello, n8n community,
I’m hoping for some ideas on a tough WordPress API issue.
My key question is: Why would my HTTP Request node fail to upload an image to WordPress (it gets the homepage HTML back), when the official WordPress node works perfectly with the exact same credentials? I suspect a firewall issue, but I don’t know what difference it’s detecting.
Here is a summary:
-
Goal:
POSTa binary file to/wp-json/wp/v2/media. -
What Works: The official
WordPressNode successfully creates posts and tags. This proves my credentials and the basic API connection are fine. -
What Fails: The manual
HTTP RequestNode fails when uploading a file. The response is always my homepage’s HTML, not a JSON error.
My Environment:
-
n8n Version:
1.109.0 -
Running n8n via: Docker
-
Hosting Provider: Hostinger
What I’ve Already Ruled Out:
-
Credentials: They are correct (proven by the official node).
-
Permalinks /
.htaccess: AGETrequest to/wp-json/works fine. My.htaccessis standard and includes theSetEnvIf Authorization...rule. -
Plugins: The issue persists even with all plugins (cache, security, etc.) disabled.
-
User-Agent Header: Adding a standard browser User-Agent to the
HTTP Requestnode did not solve the issue.
I’m stuck because all the usual solutions have failed. The only clue is that the official node has a “secret ingredient” that my manual HTTP Request is missing.
Any ideas on what that could be? Thank you in advance!