If a WordPress site has plain permalinks setting enabled, I believe this affects how you can call/access API routes (please correct me if I'm wrong).
This is the setting I'm referring to:
When plain permalinks are enabled (the default setting), the curl examples in the docs don't work. For example:
curl http://localhost:8222/wp-json/wp/v2/posts
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.38 (Debian) Server at localhost Port 8222</address>
</body></html>
(The examples work fine with any other permalink option enabed.)
I think there might be other gotchas when WordPress is installed in subfolder on the server. It would be great to add a section to the docs outlining these potential gotchas for new developers.
This section could also include recommendations for how to set up your WordPress install so the examples work out of the box. (Note that plain permalinks is the default setting in WordPress.)
If a WordPress site has plain permalinks setting enabled, I believe this affects how you can call/access API routes (please correct me if I'm wrong).
This is the setting I'm referring to:
When plain permalinks are enabled (the default setting), the curl examples in the docs don't work. For example:
(The examples work fine with any other permalink option enabed.)
I think there might be other gotchas when WordPress is installed in subfolder on the server. It would be great to add a section to the docs outlining these potential gotchas for new developers.
This section could also include recommendations for how to set up your WordPress install so the examples work out of the box. (Note that plain permalinks is the default setting in WordPress.)