Wordpress issue when publishing new post/updating site

Hi all,

I think this has problem come up before but I’ve searched online for a while and unable to find an exact solution so far. I believe it’s a caching issue/conflict with one of my plugins as everything looks fine when I’m logged in, but when I publish a new blog post it takes a while for it to appear on my homepage for visitors.

I’ve also made custom pages with categorised feeds of blog posts. These pages (particularly the sliders at the top of the page), break as well as the style/design of the page when a new post is published.

I have Autoptimize installed and clear the cache and then purge the cache from Cloudflare which seems to resolve the issue after some time has passed, but this is not an ideal solution long term for every new post or update I make on my site. Autoptimize optimises the JSS, HTML and CSS and I’ve turned this off in CloudFlare, but I figure there may still be a conflict?

I also disabled the WP Super Cache plugin today as I wasn’t sure if this was what was causing the issue with Cloudflare as I’ve set it to simple cache (Cloudflare Cache I’ve set to Standard and TTL 4 hours), but unfortunately my newest blog post (published yesterday) just shows a page of code now when you click on it. I’ve reverted to enabling WP Super Cache as disabling it has obviously only made the problem worse.

Any advice is much appreciated as I’m not the most technical.

Thank you very much!

Cloudflare doesn’t cache HTML by default. It sounds like you’re just using standard caching which only applies to static files (images, JS, CSS, and a few others).

It’s more likely that the page is cached somewhere on your server due to a plugin or a server cache option from your host.

If you post the URL, we can see if Cloudflare would cache it.

1 Like

The HTTPS server would likely need headers set
‘Cache-control’, no-store
‘Cache-control’, public, max-age=3500

I would genuinely try to tune your code to behave better with this caching practice, it can benefit you greatly.

Hi there, thanks for the speedy response.

Here is the url: https://www.explorewithed.co.uk/

Thank you for your advice on this - I’m not sure how I would tune the code - my level of knowledge on this is toggling settings in the plugins and on Cloudflare/my host.

There are two caching headers in the response. The one from Cloudflare is the default (DYNAMIC), saying it won’t cache the page. I don’t know what the other one comes from, but it does imply you have some sort of cache at the hosted site.

x-proxy-cache-info: DT:1
cf-cache-status: DYNAMIC

Thank you! Is it common for hosting to cache as well or would it more likely to be a plugin conflict? As mentioned I have WP Super Cache and Autoptimize installed - I wasn’t using the Cloudflare plugin before starting this thread so I’ve installed this now to see if that will help them work together as I read it should work hand in hand with Autoptimize.
So far, all seems ok but I haven’t updated my site since to see if the issue reemerges.

Your advice is much appreciated, thanks again! :slight_smile:

If you setup the Cloudflare Page Rules to “cache everything”, then Cloudflare should cache your HTML pages (generated by WP Super Cache plugin) and you should see cf-cache-status: HIT, MISS, REVALIDATED, UPDATING or either EXPIRED.

You do not need Autooptimize plugin, just enable “Minify HTML, CSS, JS” in Cloudflare dashboard :wink:

If any other issues appear, I recommend you to try disabling all the WordPress cache plugin and try with the APO for WordPress for some time and see how it goes - I used it, works great for me.

Thank you for your advice and links, very helpful, I will look into it.

And I’ve thought about deactivating Autoptimize and letting Cloudflare handle the minifying of HTML, CSS and JS but I wasn’t sure if the change over would cause another issue, temporary or otherwise as it took me a while initially to figure out the correct settings in Autoptimize that didn’t break my template.

Thanks for the tip on APO as well, may be worth considering if all else fails! :smiley:

1 Like

This topic was automatically closed after 31 days. New replies are no longer allowed.