WordPress REST API (wp-api) 404 Error: Cannot access the WordPress REST API

UPDATED NEW WAY I also faced similar problem in a local project. I used index.php after my project url and it worked. http://localhost/myproject/index.php/wp-json/wp/v2/posts If it displays a 404 error then update permalinks first (see “Paged Navigation Doesn’t Work” section If it works, maybe you need to enable mod_rewrite, on ubuntu: a2enmod rewrite sudo service apache2 … Read more