WordPress 6+ REST API Change Not Updated In Official Documentation. How to use?

[ad_1]

In documentation the url to access the API is in /wp-json/wp/v2/posts/ for example in this site but in clean install wordpress 6+ the url didn’t work. it bounce back to home page. after searching a bit i found out the url form should be like this http://localhost:8002/?rest_route=/wp/v2/posts/ to make it working. i tried on my local and it’s really working.

is it normal or i miss something?

[ad_2]
1 Comment
  1. Just guessing. But your install is in local host that’s maybe why the URL is as you see it. Did you try with another public site?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer