Fix: The WordPress REST API
The WordPress REST API is the best way to access or modify WordPress data asynchronously. You can expect soon that the whole WordPress Admin will use it (and it will be great!).
This article is being improved based on my users’ feedback. I will improve this troubleshooting little by little, so don’t hesitate to share your issues or your findings in the comments. Thank you :)
Check if the WordPress REST API is enabled
The best way to check is to visit this URL: https://yoursite.com/wp-json. If you see some information which seems related to your WordPress REST API, it works. If you see something, it means that, at least, your WordPress REST API is enabled. If it’s not working, you should try to enable it.
Visit your Settings > Permalinks. Make sure Plain is not selected. Usually, Post Name is the best choice. Even if everything is fine, click on Save Changes. That will rewrite/repair your .htaccess.
Are you using a security plugin? They might block the Rest API. Make sure it doesn’t.
The Rest API is Disabled or Broken
If you are using a plugin made by Meow Apps, you might encounter this message. It means either that the REST API is not working, or that the reply by the server is broken.
You should first check if the REST API is enabled (the first section of this article). Don’t look for a mention to the plugin in this list; the plugins made by Meow Apps are not added themselves in there and their code is only loaded when needed, for optimization and security purposes.
Otherwise, it might be that the reply is broken. That basically means an error happen on the server side. In this case, there are two things you can do :
- Check errors on the server side: The PHP Error Logs
- Check network errors: Check Network Activity with Google Chrome
Keep in mind that the errors might be not related to the plugin you are having a problem with. Any plugin (theme, or others) breaking during the process of an API request will break that request.