New Blog Posts Don’t Show Up Right Away
If your site has a static home page and a different page to display blog posts, and if you find that when you publish a new post, it doesn't show up on the site right away, there are two likely solutions.
Specify the page for posts in WordPress
The problem is most likely that you haven’t configured the Page for Posts setting in WordPress→Settings→Reading correctly:
So the easiest solution is simply to specify your Posts page. If you haven’t an empty page at hand, just create a new one. In our example it has the title Blog:
This way, WP Rocket will detect which page’s cache it needs to clear when you publish a new post.
Use WP Rocket’s setting
An alternate solution is to enter the URL of your posts page in Advanced Rules→Always Purge URL(s) in WP Rocket:
Other possible issues
If you find that refreshing your browser cache solves the problem, it means something is setting a long browser caching rule on the HTML for your page. WP Rocket doesn’t do this by default (to avoid this precise issue), but some server-side rules, or conflicting .htaccess rules could cause this problem.
To see if this is the issue you can check the headers on the HTML file by going to the Developer Tools in your browser and clicking the Network tab:
In this case you can see that the
max-age (defined in seconds) is set to
1 month, and the
Expires inherits that value (screenshot taken on May 22nd 2017). This will prevent new content showing up right away.
If you see this issue, check your .htaccess rules, or ask your web host if it’s in the server configuration.
Another cache layer
If you use Varnish, Cloudflare, CloudProxy (from Sucuri), Incapsula, or any other form of caching, you may need to clear that cache manually to see your content.