APO cannot be activated / WordPress plugin not detected on multi language site


I am trying to activate APO on two domains (different languages) for the same WordPress website, but the Cloudflare interface responds “The WordPress plugin was not detected on [domain]” for one of the domains.

More details:

  • The WordPress website has several languages (translations) and each language is on its own domain. This is done with the WPML plugin.
  • For illustrative purposes let’s say the domains are example .com (English) and example .net (Spanish).
  • When logging into the backend, example .com is where all the settings are made, regardless of from which domain you log in.
  • I added both example .com and example .net in Cloudflare (two separate zones).
  • I installed the Cloudflare plugin and activated it.
  • Cloudflare is active on both domains (Cloudflare headers are present).
  • I paid for APO on example .com and activated it. It works.
  • I paid for APO on example .net but here is the problem, I cannot activate it in the Cloudflare admin area. I get the message that the plugin is not installed on the website, even if it is.

I assume this has to do with the fact that the plugin is installed on example .com and not on example .net, but it is the same website and there is no way to install it on example .net since the two domains are sharing the same WordPress installation.

What do I need to do to activate APO so that it works on both domains?

Thanks for your help!

To activate APO on both domains, you can use the APO API to add the second domain (example .net) to the hostnames list so that APO will run on both hostnames. However, note that automatic purging will only be triggered on the primary domain (example .com) where you have the plugin installed. You will need to manually purge the second domain whenever the content changes.

One way would be to make WordPress send the request for you. But since you can’t install the Cloudflare plugin, I’d assume you cannot add any other plugin to that installation. Another option would be to write a script to purge the relevant pages via Cloudflare API and have it set in a way that it runs whenever content is changed for that language.

As for enabling APO via API, make sure you run the API command using the example.net zone, its own API Key/Token etc. The API command will take several parameters, but you only need to patch what’s relevant to your case. For instance, changing the enabled parameter from false to true may be enough to allow you to make it work. You can always run the GET API query to see how APO is set for the zone and change accordingly.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.