Blog posts not appearing on main page issue in WordPress

Just wanted to share a recent example of a WordPress issue that had me scratching my head just in case some of you might run into this situation. I’ve seen this posted in help sections with a variety of answers with some lingering questions as well.

The issue: site visitors noticed blog posts were not appearing on a site’s main page despite being published and viewable by the admin.

At first it looked like a potential browser issue as I was logged in and tested this in other browsers and was able to see what others were seeing. The admin section showed all posts as published. Visitors were also seeing some excerpts on the site’s main page with broken image indicators. This also led me to think possibly it was an issue with missing images or changes to associated featured images, but this was not the case.

The main part of the problem was the fact there were complete posts and images that were just not showing up to non-logged-in visitors.

As a visitor if you followed the broken image links to the posts page you could actually get the posts with the missing images to display, but not the new posts.

I’ve read other postings on this same subject and most were leading people in the direction of caching issues associated with this kind of thing and in fact, that’s what it ultimately was related to.

Weeks prior to this issue I had deactivated and removed the W3 Total Cache plugin from the site as we just weren’t getting the benefit for this particular site. That’s what confused me as well, no caching was present at all.

What happened was that W3 Total Cache left behind it’s caching code in the htaccess file. Once that was removed, all was good and back to normal.

If you do run into this or a similar type of issue, consider copying over a fresh, basic htaccess file for WordPress while of course keeping a backup copy of what you’re overwriting.