i can’t get into working, it always return 404 not found error
Just to clarify, is your theme returning a 404 not found error, or is the API returning a 404 error?
If it’s the theme, can you try:
* flushing your rewrite rules
* temporarily switching to a different theme
* disabling all plugins other than WP-API
If it’s the API, can you share the exact request you’re making, and the response you’re seeing?
it’s the api and the plugin is active.
the request:http://www.portal-homologa.prodesan.com.br/wp-json/wp/v2/posts
the response is:
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /wp-json/wp/v2/posts was not found on this server.</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at http://www.portal-homologa.prodesan.com.br Port 80</address>
</body></html>
Actually, this message is being produced by your server, and not WP-API. In fact, the request isn’t ever making it to WordPress.
It seems pretty permalinks are enabled for your site, but not properly configured with your server.
ok, thanks, i will take a look.
so i need to see what’s going on which pretty permalinks in my site in order to wp-rest-api to work?
so i need to see what’s going on which pretty permalinks in my site in order to wp-rest-api to work?
Yes, or disable pretty permalinks entirely as WP-API will work without them enabled.