I just enabled the WP REST API plugin on three of my sites. On two of them I am able to hit the posts endpoint and get the data returned that I am looking for.

On the third I am getting 500 errors when I try to hit /wp-json or /wp-json/wp/v2/posts.

Any idea what would be causing this? I will say the third site has upwards of 500+ posts, where the other two have about 40 each. But why would that affect /wp-json?

  • A 500 error is your servers way of saying something went wrong but it doesn't know what, you need to do some debugging steps in order to get the actual error message, check your PHP logs, turn on WP_DEBUG, etc etc – Tom J Nowell Nov 17 '16 at 19:55
  • Thanks. Normally I would, but the problem site is not mine. I have very limited access. Anyway, I figured it out--they are still running WP 4.4. I'm hoping an update fixes it. – hcu564 Nov 17 '16 at 20:23

You should use custom permalink in your wordpress, please update permalink option.

Any way you can use this url ?rest_route=/wp/v2/posts

  • I voted this up, but when I tried it on my problem site, it didn't work. The result of ?rest_route=/wp/v2/posts is identical to ?rest_route=/wp/v2 – ultrageek Sep 25 '17 at 0:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.