-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Confirmation
- My issue isn't already found on the issue tracker.
- I have replicated my issue using the latest version of the plugin and it is still present.
WordPress version
5.8.2
Cloudflare-WordPress version
4.6.0
PHP version
7.4.24
Expected result
Cloudflare for SaaS was recently made general available outside of Enterprise plans. This enabled interesting usecases for WordPress Multisites.
This feature requests aims at enabling APO for SaaS enabled domains in a WordPress Multisite "Network" mode.
Instead of activating and configuring the plugin on single sites, I suppose to add a "Network Activate" mode which only connects against the CF SaaS Zone instead of individual zones.
To make this work several changes are required in this plugin as well as on Cloudflare (APO):
- CF APO: Allow "alternate hostname" domains to be handled via the primary zones APO instead of just the primary zone domain
- CF (APO?): Purge the cache for Alternate Hostnames on the primary zone
- CF WP: Add the possibility to be network activated
- CF WP: In Network Mode: Add the CF config / login screen only to the Network Admin
- CF WP: In Network Mode: Remove Config screen from single sites
- CF WP: In Network Mode: Validate alternate hostname on single site using the Custom Hostname API: https://api.cloudflare.com/#custom-hostname-for-a-zone-list-custom-hostnames (Contrary to what the docs states, this is available on all account types now. Not just Enterprise. I just verified that.)
- CF WP: In Network Mode: If sites domain is setup as alternate hostname of the primary SaaS zone: Handle Cache purging for all single sites against the globally configured primary zone
This would one allow to either continue to use the plugin as it is by activating it on a single site. But it would also unleash the potential features of the CF for SaaS offering.
Yet the biggest roadblock is that APO currently does not function on alternate hostnames in a CF SaaS setup.
Actual result
CF WP has to be enabled on a single site and connected against individual CF zones. There is no support for "alternate hostnames".
Steps to reproduce
- Setup a WP Multisite in Subdomain Mode (doesn't matter if subdomain or subdir) with at least one additional site (Network Domain for this example:
mysaas.com) - Setup a second site within this network. Subdomain:
aclient.mysaas.com - Change the second sites domain from
aclient.mysaas.comtoaclient.com - Configure
mysaas.comin Cloudflare - Add
aclient.comas an alternate hostname formysaas.com - Activate CF WP on the primary network site and login
- Activate CF WP on the second network site
aclient.comand try to login => As this is not an individual CF Zone it will fail
Additional factoids
No response
References
No response