WordPress Media Upload Fails with HTTP Request (but Succeeds with WordPress Node) on Hostinger

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: POST a binary file to /wp-json/wp/v2/media.

  • What Works: The official WordPress Node successfully creates posts and tags. This proves my credentials and the basic API connection are fine.

  • What Fails: The manual HTTP Request Node 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: A GET request to /wp-json/ works fine. My .htaccess is standard and includes the SetEnvIf 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 Request node 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!

Did you suceed to do it ?

I’m having the same issue. Wordpress node works just fine, but HTTP request gives me the following:

Authorization failed - please check your credentials

Sorry, you are not allowed to create posts as this user.

@Martin_Neumann had a similar problem trying to get comments. He concluded later that it was a credentials issue but didn’t provide detail how the credentials were fixed.