I’ve been using a Python script to fetch and modify posting day of scheduled posts in WordPress via the REST API with the following URL:https://{domain}/wp-json/wp/v2/posts?per_page=100&post_status=future&post_type=post&orderby=date&order=asc
This script worked perfectly until a few days ago. Recently, it started retrieving posts that I had previously deleted, and these posts do not appear in the trash nor are they listed under the future post status in the WordPress admin. But After using this script, this ghost post appear from somewhere…
The issue persists even after clearing all forms of cache and verifying the database integrity.
Has anyone experienced a similar issue or can offer insights into why deleted posts might still be retrievable via the API? How can I resolve this to ensure only valid, non-deleted future posts are fetched?
h20gg702 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.