Skip to content

Commit a61b9cb

Browse files
authored
add a note about enabling permalinks
REST API routes don't work with a default installation of Wordpress, which has 'ugly permalinks'. I think it should be mentioned on the first page of the documentation. A new user shouldn't have to hunt on Google for clues on why the api they want to try out doesn't work 'out of the box'. Related issue here: WP-API/WP-API#2623 I am not sure about the wording, so please let me know if you'd phrase it differently.
1 parent 98608c4 commit a61b9cb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Each of these concepts play a crucial role in using and understanding the WordPr
3333

3434
A route, in the context of the WordPress REST API, is a URI which can be mapped to different HTTP methods. The mapping of an individual HTTP method to a route is known as an "endpoint". To clarify: If we make a `GET` request to `http://oursite.com/wp-json/`, we will get a JSON response showing us what routes are available, and within each route, what endpoints are available. `/wp-json/` is a route itself and when a `GET` request is made it matches to the endpoint that displays what is known as the index for the WordPress REST API. We will learn how to register our own routes and endpoints in the following sections.
3535

36+
[info]In order for the REST API routes to work, you should have [Pretty Permalinks](https://codex.wordpress.org/Using_Permalinks) enabled on your Wordpress site.[/info]
3637

3738
### Requests
3839

0 commit comments

Comments
 (0)