Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a61b9cb

Browse filesBrowse 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
Copy full SHA for a61b9cb

1 file changed

+1Lines changed: 1 addition & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎index.md‎

Copy file name to clipboardExpand all lines: index.md
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.