What I want to establish

I want to create a custom post from an external website using WP REST API. The target website (where the post should be created) is protected with basic auth.

What I have done so far

Created an user with application password and created the request for the REST API.

Current state

The request is working as long as there is no basic auth at the target website. If the basic auth is activated with htpasswd the request failed with "authentication error".

It is clear to me that this is caused by the duplicate basic auth for the htpasswd and application password, but is there any other solution to this? The target website has to be protected because it is the development instance.

  • 1
    It may be that there is no solution here that involves basic auth if you're unable to allow the application password through at the server level. How you would do that though is not a WP question or even a PHP question, but an Nginx/Apache/etc question
    – Tom J Nowell
    Nov 15, 2022 at 10:47


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.