LoginSignup
3
2

More than 1 year has passed since last update.

Wordpress | WP REST API | /wp-json が見えない(無効化されている)

Posted at

wp-jsonが見えない

WP REST API はWordPressの標準装備なので、見えないはずがない。
docker-compose でインストールしただけなのに、見えない。
StackOverflow を見ても書いてない。と、困った時の備忘録です。

結論:パーマリンクの設定を変える

デフォルトで 「基本」 が選ばれている。
image.png
 ↓
「基本」じゃないやつを選ぶ
image.png
これだけ。

パーマリンクの設定を変えたくない場合

docker-compose で立てたら、すぐに使いたい。
そういう場合は、URLは /wp-json ではない。

/wp-json/?rest_route= に変える事で動きます。

参考リンク

3
2
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2