My YunoHost server
YunoHost version: 11.2.5 Stable
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
I’m trying to access Wordpress API from outside, but since WP recently switched to Application Passwords, and Application Passwords seem to not playing well with the Basic Authentication, I’m stuck.
This is the error message on Wordpress/Users/Profile:
Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.
Any leads from here? Should I try to remove Basic Auth? If so, how?
I’m wondering if it’s even possible to disable Basic Auth anywhere.
I’ve finally found the correct way to do this and I’m sharing my findings for future Yunohosters who may encounter the same issue.
The reason I couldn’t access the API was that it simply wasn’t there. Try going to https://yourdomain.tld/wp-json/. If you encounter a “Not Found” page, your WordPress Permalink settings need to be adjusted.
By default (in both Docker and YH app), Permalink pages are set to “Plain” mode. If you check https://yourdomain.tld/?rest_route=/wp/v2, you’ll see that you can indeed access the API.
To resolve this, go into your WP Dashboard > Settings > Permalinks. Change your Permalink structure to anything other than “Plain”. Once you save these changes, you’ll see that you can now access your REST API over https://yourdomain.tld/wp-json/.
Following these steps will save you from hassling with Application Passwords.