CMS Mastering Development Wordpress

WP REST API returns empty posts despite entries in wp_posts

Using WP API to query posts. There are many entries in wp_posts, but the API always returns an empty array. Request: /wp-json/wp/v2/posts/ Response: [] Request: /wp-json/wp/v2/posts/3553 Response: { "code": "rest_post_invalid_id", "message": "Invalid post ID.", "data": { "status": 404 } } Yet, querying MySQL directly: SELECT count(*) FROM wp_posts; returns 391 SELECT count(*) FROM `wp_posts` where […]