使用 REST API V2 在 WordPress 中的 http://localhost/wp-json/wp/v2/posts 上出现 404

2024-01-12

我收到 404http://localhost/wp-json/wp/v2/posts http://localhost/wp-json/wp/v2/posts路线。我将永久链接类型更改为普通链接。仍然遇到同样的问题。

如果它有用,我的 ubuntu 16.04 桌面最近从 15.10 升级,遇到了 php5.6 到 7.0 升级的问题。我现在使用 php 7.0

编辑1: 尝试了所有其他永久链接设置组合,没有结果!


http://localhost/?rest_route=/wp/v2/posts应该有效。 参考https://developer.wordpress.org/rest-api/using-the-rest-api/discovery/ https://developer.wordpress.org/rest-api/using-the-rest-api/discovery/了解详情。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 REST API V2 在 WordPress 中的 http://localhost/wp-json/wp/v2/posts 上出现 404 的相关文章

随机推荐