LS Cache Plugin (WordPress) with Cloudflare API

Hello everyone.
I don’t know if my question belongs to “Getting Started” or “Developers API” but since I’m a total noob with Cloudflare I figured it might make more sense to ask it here.

I have question concerning Cloudflare integration in LS Cache plugin in WordPresss.

In Wordpress > LitesSpeed Cache > CDN > Cloudflare API I have “Cloudflare API” set as active, have filled my email address I’m concerned about “Cloudflare API Key” and “Domain

In fact, I’ve created an account on Cloudflare add added a first domain name mymaindomainname .com which is the main domain name link to my hosting.

On my hosting I now have a second website mySecondedomainname .com.

So in Cloudflare, rather than creating a new account I’ve just added the new domain name

However I believe (but I might be wrong) that I have only one global Cloudflare API Key for my account and not one per domain.
Therefore, when I put my global API Key in the “Cloudflare API Key” in LS Cache Plugin on mySecondedomainname .com, then the domain that appears in the “Domain” field is mymaindomainname .com, when it should be mySecondedomainname .com I assume ?

Am I missing something ? Or is it normal that I have my “main domain” mymaindomainname .com in the domain field on the website mySecondedomainname .com ?

Looking forward to reading you !

This is correct. For LS Cache, enter the domain name of that site so it can purge the correct cache. In Cloudflare, there’s no “main domain.” They’re all equal with no priority given to any of them. It’s not like cPanel with a main domain, then addon domains.

Thanks for the very fast answer and explanations ! I just manually wrote the correct domain in the “domain” field of the Cloudflare pluging in the LS Cache plugin on the second website. It seems to be all good !

Just for the sake of understanding, I’m wondering why when I only entered my API key in the plugin without specifying a domain name, it retrieved the wrong one. Maybe it’s because I created the “wrong one” first on Cloudflare? Or because it starts with the letter A when the “correct one” starts with an M ?
Just trying to understand !

Thanks again for your help.

LiteSpeed tries to guess, but I always entered the domain name.

1 Like

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