Here’s my configuration:

  • WordPress multisite installation on a subdirectory
  • WordPress version is 4.7
  • Let’s say my WordPress site is example.com/mywebsite
  • My WordPress site has published posts

The issue I have is when accessing example.com/mywebsite/wp-json I get a JSON response which lists the available endpoints under the routes property:

  • /
  • /oembed/1.0
  • /oembed/1.0/embed
  • /yoast/v1
  • /yoast/v1/configurator

According to the documentation I should see loads, ie ‘/wp/v2/posts’ but these do not appear in the list of available endpoints. Furthermore, trying to access these, ie ‘example.com/mywebsite/wp-json/wp/v2/posts’ returns 404.

I tried in another multisite installation and all the endpoints were returned as expected, and I was able to successfully visit say example2.com/othersubdirectory-site/wp-json/wp/v2/posts and the json payload was a list of posts as expected.

There are no plugins installed that would block or remove my endpoints, and I can’t find anything in Yoast about removing these endpoints. I literally have no idea why this isn’t working. Nothing in my error logs, no notices appearing in Dashboard. No caching plugins installed, nothing.

1 Answer
1

No Result found(404) because your plugins endpoints may not have been compatible with the WP Rest API v2. Please see the list if they are compatible or not :

http://v2.wp-api.org/guide/plugins/

Leave a Reply

Your email address will not be published. Required fields are marked *