Wordpress media uploads ignored by Browser Cache TTL settings

I have a Wordpress site with a custom media folder as set in wp-config.php below:

/* Changes the default media upload location. */
define(‘UPLOADS’, ‘’.‘media’);

Unfortunately, the Browser Cache TTL settings in Cloudflare is ignored for all media URL’s in https://domain.com/media/

Why does Cloudflare ignore the media folder?
Is there a workaround not including Page Rules?

Cloudflare doesn’t care which folder its in. It’s possible something at your server is telling Cloudflare to not cache that folder, or you have a Page Rule that’s doing it. Without a URL example, we can’t check. Post the URL of a resource that’s not cached, and we can take a look.

Here are some URL:s where Cache TTL = 2 minutes:

https://domain.com/media/image.png

Here are my Page Rules.

Cache on the first image is set to 60 days. Cloudflare will not decrease this; only increase if Origin sets it too low.
Your Page Rules don’t include the Media folder.

https://support.cloudflare.com/hc/en-us/articles/200168276-Understanding-Browser-Cache-TTL

Thanks for the answers. I understand how it works now after having read the post you referred to.

1 Like

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