Cloudflare only proxies (like an enhanced firewall) your site. Cloudflare is also a domain registrar if you’d like to transfer your domain registration over here. But no hosting.
Besides .htaccess, your WordPress caching plugin may be adding these headers. Check to see if your caching plugin is enabled (some cache plugins will be initially disabled after you activate them, waiting for you to enable it after adjusting its settings), and look for special settings like “do not cache known users”, or “do not cache home page”.
Actually, it’s my experience that WordPress by default will send a Cache-Control: no-cache or similar header in a standard installation. It’s the job of your cache plugin, after proper configuration, to change that according to the settings you chose. So I’d suggest you keep your caching plugin, but go through it’s setting page(s) and make sure you fine tune it to cache your dynamic pages (I’m assuming you want that).
Many settings will be a matter or trial and error, until you get satisfied with the results. Always remember to flush the cache of both the plugin and Cloudflare every time you change settings.
I guess that you should avoid using this LiteSpeed plugin as its basically for LiteSpeed server only. If you want to use a plugin then better go with Cloudflare official cache plugin and make these settings:
Also another problem is with the url ended with ?ver=5.1.1 , these appended query strings does not cache the content often. There exists plugin that remove these query strings from the end of url. You should check for other css, js, images url on same page if they are caching or not.
I let Cloudflare handle the minifying and gzip. I really just use it for the page caching. I’m not even sure why I enabled Browser Caching because I set that in my Cloudflare Caching settings page.
There’s also the chance it’s something set in your Hosting configuration. But it’s clearly not set by Cloudflare.
If the Cache-Control header is set to “private”, “no-store”, “no-cache”, or “max-age=0”, or if there is a cookie in the response, then Cloudflare will not cache the resource, unless a Page Rule is set to cache everything and an Edge Cache TTL is set.
The above explanation is from the Cache app help page. You must ensure that the Edge Cache TTL is set on the same page rule that defines “cache everything”.
So you need to have a few page rules, to make sure your wp-admin area is never cached, and to cache everything else, and place them in the following order:
Then a second page rule: *example.com/*
Cache Level: Cache Everything
Edge Cache TTL: a month
Browser Cache TTL: a day (optional)
If you have plugins that depend on accessing /wp-json/, you may have to add another rule between them. Same settings as the first rule, but for *example.com/wp-json*