最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

wordpress.com hosting - Rest API in self-hosted page doesn't work

matteradmin9PV0评论
Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question

First of all, I'm a total WordPress newbie and I genuinely couldn't find an answer to my question:

I have a site hosted in WordPress () which I'm planning to use as a testing API endpoint, however, when I test the endpoint I get a Page not found.

I'm reading the documentation and it seems like WordPress has integrated Rest API to the core so in technically this should work without any plug-ins?

Am I missing something?

Thanks a lot in advance for your help.

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question

First of all, I'm a total WordPress newbie and I genuinely couldn't find an answer to my question:

I have a site hosted in WordPress (https://srebelo80.wordpress) which I'm planning to use as a testing API endpoint, however, when I test the endpoint https://srebelo80.wordpress/wp-json/wp/v2/posts I get a Page not found.

I'm reading the documentation and it seems like WordPress has integrated Rest API to the core so in technically this should work without any plug-ins?

Am I missing something?

Thanks a lot in advance for your help.

Share Improve this question edited Dec 6, 2018 at 11:51 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Dec 4, 2018 at 11:23 TeknoticaTeknotica 1034 bronze badges 2
  • wordpress is not self-hosted. "Self-hosted" refers to sites that are not on WordPress. The API works differently on WordPress. developer.wordpress/docs/api – Jacob Peattie Commented Dec 4, 2018 at 12:01
  • Yes, I'm editing that part. I meant hosted on WP :) – Teknotica Commented Dec 4, 2018 at 12:14
Add a comment  | 

1 Answer 1

Reset to default 1

I'm pretty sure you're not using self-hosted WP, since you clearly mentioned that your site is running on wordpress...

And if it really is hosted on WordPress, then you'll have to use REST API a little bit different.

Your API is available here:

https://public-api.wordpress/wp/v2/sites/srebelo80.wordpress

Here you can find Console - you can use it for easy testing: https://developer.wordpress/docs/api/console/

Post a comment

comment list (0)

  1. No comments so far