App for Cloudflare® Pro

App for Cloudflare® Pro 1.8.9

WPMU Multisite Network Admin Propagation to Subsites

RROKK

New member
Hi Digitalpoint,

Nice job. I can see it took a lot of work. As one reviewer stated, "It works," and I wholeheartedly agree. Out of the box, too.

I run a fully loaded 100+ domain WPMU Multisite, just to distinguish it from a domain/subdomain install. I've also been a CF customer since the day (week) they started.

I'm running LiteSpeed, Quic Cloud, Cloudflare for DNS & Domain Hosting, and DirectAdmin. I'm not happy with Quic Cloud, too cumbersome, and "Slow Initial Response Time" is sometimes as high as 4,000ms to 6,000ms on a simple homepage. -:(

I decided to remove QC from several of my domains and try CF again. It was during this process that I came across the App for Cloudflare (AFC). So, here I am.

To answer my question, I had assumed that the AFC configuration on my Network Admin site would propagate to all of my subsites. It hasn't.

Let me know if I misunderstood the documentation or if I'm doing something wrong.

Again, congrats on the App and best of luck.

RROKK
 
Thanks, it’s always good to hear it’s appreciated. 😀

What specifically are you wanting to propagate to the subsites that isn’t? There’s less config options in the network admin side of things, but what is there should be used by the subsites when appropriate (for example the ability to use the API token set there and R2 if you want to have a network-wide bucket).
 
Digitalpoint, I appreciate your response.

When I configured the AFC in the Network Admin, I assumed that the other AFCs on the other subsites would follow suit. No?

Actually, I started to notice that I would need to import it or set everything up again after visiting a subsite and discovering that it also requested the Token.

Do you want to run me through the simplest method for configuring each subsite?

RROKK
 
Are you talking about the Cloudflare API token or individual Cloudflare settings for sites/zones?

The API token does (well it should anyway) bubble “down” to the subsites. It’s mainly intended so site owners (which could be different individuals, but maybe not in your case), can control the Cloudflare settings for their site without them having explicit access to the Cloudflare account. The token bubbles to subsites from the Network Admin plugins -> Settings -> Cloudflare page (the token is literally the only thing you can set there).

As far an individual Cloudflare settings, they are not universal for all sites (like if you change a Cloudflare setting on zone A, zone B doesn’t inherit the same setting automatically).

If you are just talking about the plugin being available to subsites, it should be just like other plugins (assuming you do the “Network Activate” under the Network Admin plugins).

If you want to bubble the API token to all subsites, make sure the token is set in the Network Admin and make sure the plugin is available to the individual sites (either individually or by activating the plugin network-wide).

Trying to cover all bases here, still not entirely sure which part exactly isn’t working as expected, but hopefully that offers some guidance?
 
Digitalpoint,

Yes, you're right. I had assumed that the subsites would inherit the settings from the Network Admin site AFC. I got it, they're not.

However, if the API Token is to show up (bubble down) to the subsites, it's not either.

I was hoping for an import/export option or something similar to make the process of setting up multiple sites faster and easier.

It appears that I may be returning to the tedious task of clicking hundreds of toggles.

RROKK
 
Digitalpoint,

Yes, you're right. I had assumed that the subsites would inherit the settings from the Network Admin site AFC. I got it, they're not.

However, if the API Token is to show up (bubble down) to the subsites, it's not either.
Not at a computer right now, so sorry for the mobile screenshot. This is what you should see if you go to the Cloudflare settings within a subsite. It should default to using the multisite token, with an override option if you want to use a different one for that site.

IMG-8511.jpg


I was hoping for an import/export option or something similar to make the process of setting up multiple sites faster and easier.

It appears that I may be returning to the tedious task of clicking hundreds of toggles.

RROKK
There is an “Easy config” option (see top of screenshot) that does set various settings in a pretty good way for WordPress. It doesn’t do some site-specific things that may be unique to your site, but I assume that’s not what you are looking for since you want it for all sites anyway?
 
Got it Digital. Yea I'll try the Easy Config it's a good start. I might suggest an "Easy Inherit" button too, that would inherit the Network Admin sites configurations. Thanks "It Works" plugin. Always nice to get something that works out of the box. I'll look into the R2 later. Is the Pro at $89 a year or lifetime? RROKK
 
Got it Digital. Yea I'll try the Easy Config it's a good start. I might suggest an "Easy Inherit" button too, that would inherit the Network Admin sites configurations. Thanks "It Works" plugin. Always nice to get something that works out of the box. I'll look into the R2 later. Is the Pro at $89 a year or lifetime? RROKK
An option to globally apply settings to all sites isn’t out of the question for future maybe. There are some things that would need to be worked out though… blasting hundreds of API calls per second to Cloudflare would get you hit with API rate limiting, so would need to artificially slow it down. Theres also the “oops” problem… would suck to do it inadvertently without an undo and then someone need to actually go to each site to fix the settings. Can see it being problematic if it’s not done carefully.

The Pro version is $89 for a perpetual license that gives a year of updates. Meaning it works forever, but say a ton of new features are added years down the road, you would need to renew license for another year worth of updates if you wanted those updates (you don’t need to pay for prior years that you didn’t renew). But it does not shut off or cripple after the year of updates… keeps working “as is” indefinitely.
 
Digital, didn't see your image until now. Was broken when it first came up. I see it now and I don't get the radio buttons showing on your image, at all. I've disabled and reenabled the AFC plugin and still no radio button. So, I'm just pasting the Network Admin token into each subsite. I assume that's basically the same.
 

Attachments

  • Screenshot_23-1-2025_1845_ledlightsia.com.jpeg
    Screenshot_23-1-2025_1845_ledlightsia.com.jpeg
    423.3 KB · Views: 0
Are you 100% certain you set it on the Network Admin -> Settings -> Cloudflare page? It’s a page that the only thing you can set on it is the API token.

I double checked the logic/code that decides when to show it how I sent the screenshot (where you can use the multisite token or add your own), and it fairly straightforward...

PHP:
if (is_multisite() && !empty(get_site_option('app_for_cf_network')['cloudflareAuth']['token']))

So if the site is part of a multisite network and the token is set within the network admin area (different than the site admin area). Assuming the site is part of a "normal" multisite network., you should have the "My Sites" menu up top in the admin bar like so:

image.png


Network Admin -> Settings -> Cloudflare is where you would set the network-wide API token.

...at least that's where it should be. I've been looking through code on this side to see if there might be something else that would affect it, but the logic is fairly straightforward (as I mentioned above). If you are 100% certain it's set on the network admin side and not bubbling to subsites, I'll keep digging on what could possibly be the issue, but right now I have no clue what that might be...
 
Good morning,

Got up. It's 4am…

Internet is faster thru the Great Wall early.

Watched the first pour of espresso #1 of 10 as I did squats.

Sat down to take my first sip from my clay-thrown espresso cup, turned and fired in Hanoi.

Flip on my Pikes Peak to start the day, metaphorically (five monitors, one a 40", three laptops, a wireless keyboard+mouse orchestrating it all, and a partridge in an orange tree).

Why an orange tree? One, I'm an atheist, and two, I'm in China. Which is actually a good place to be if you're an atheist.

Now, doesn't that tell a lot in so few words. Not a question.

Anyway, finally got down to business. Read your (Shawn's) reply. I take it you're Shawn, being I see no other Git collaborators on this Git code, although you do use "we" a lot.

To the point, you're right, I missed that, and once I pasted in the Token, everything worked, perfectly.

It works again. Of course, what else is there to expect from Mr. Digital Point. Again, not a question. -:)

However, I've already configured about five sites, and I dread the day ahead. Not that I need to configure the toggles and dropdowns and verify each page of AFC on over 100 websites, but I need to assign this task to one of my remote workers (Philippines), who is likely to make several errors due to the large number of pages that need to be manually updated.

I think the "Easy Copy" (Network admin configuration to subsites) next to the "Easy Config" button would open AFC up to a new niche market. Cloudflare power users, like me. Undo really not needed, at this time, if ever.

Espresso #2 of 10 and more squats awaiting.

RROKK

P.S. Espresso is best with civet beans, Robusta from Nam.
 
You are correct that currently this project is “me”, not “we”. Was started because I needed it for my sites, but that wasn’t even WordPress. It was only later when users of that platform really liked it, I thought it would be interesting from a developer standpoint to see if I could make the internal libraries/code work seamlessly on different platforms (which it does now… an addition/change to one and the feature magically shows up on the other platform version too). The original (pre-WordPress) version is here


But ya, I agree that a settings copy mechanism would be useful as long as it’s done right (being wary of too many API calls to Cloudflare at once so people don’t get temporary rate limits on it, as well and making sure it’s very deliberate and no one can accidentally do it without intention).

Realistically, I don’t have a timeline on it though… but it has been added to a general “to do” list.
 
Back
Top