I have seen a number of posts addressing this (such as 404 on http://localhost/wp-json/wp/v2/posts in wordpress using REST API V2) but none of the suggestions have worked. I've tried
- chmod'ing wp-content to 777
- changing the permalinks to something other than 'plain' (and also changing them to plain and then back again)
I'm trying to access the JSON API from a localhost installation but keep getting a 404 error. Perhaps it's my URL?
I'm trying to access
http://localhost/wp/v2/posts
and I get 404
Someone suggested
/wp-json/wp/v2/
but that didn't work either.
http://localhost/wordpress pulls up the WP page just fine.
I am running this under MAMP Apache on MacOS. WP 5.1. Any help much appreciated!