I am using cloudfront for my site. Every so often, a version of my site's home page gets saved to the cache which, instead of showing the selected home page, is showing /wp-content/themes/my-theme/index.php
. It's as if, for some crawler or user, the static home page that I had set to be used in customization was overridden.
Nothing in the cloudfront logs makes any sense to me. It doesn't look unusual. Is there any kind of request that could cause the static home page to fail to show? I can't replicate the issue because I don't know what caused it to display wrong in the first place.
update: I've been able to replicate by opening in incognito window in prod environment. This reliably shows the "latest posts" page instead of the static home page.
home.php
? A page set in the admin area in the dropdown? Custom code? Are you using a page builder? Keep in mind thatindex.php
is at the bottom of the template hierarchy and is the last template WordPress will try to load after checking everything else. Also be mindful that adding URL parameters can change the request and thus the template and posts loaded, even on/