Automatic Platform Optimization - Cannot detect WP or plugin

I had tried that previously, and just tried again. Unfortunately, that didn’t solve the issue either. Thanks for the suggestion though.

I’m having the same issue. Plugin installed, all caches (everywhere) cleared. WP Rocket Cloudflare add-on off. But Cloudflare still doesn’t recognize that the Cloudflare plugin is installed.

But it acts like it does. If I turn off APO on Cloudflare, it turns off in the plugin, and vice versa. So they operate like they are synced. It’s just that text that makes it seem like it’s not recognized. Guessing it may be working even without the “detection” content clearing.

EDIT: I wrote that and 5 minutes later, it detected. It must have been the cache clearing with the addition of a little time.

Same here, tried clearing all kinds of caches both in WP Rocket and on Cloudflare, didn’t help.

I disabled cloudflare in wp-rocket, disabled every cache plugin and flushed the cache, but after 3 ours still not detected the plugin. What else can I try?

Hello,
Can you please try to:

  1. Update the Cloudflare WordPress plugin in the WordPress dashboard
  2. Purge the cache in Cloudflare (and on any other cache solution you might be using)
  3. Disable the Automatic Platform Optimization for WordPress in your Cloudflare Dashboard, and then re-enable it again

Same issue here. I have a support ticket open but so far no solution.

Hi, I just went through the steps you suggested, unfortunately, the plugin is still not detected. The optimization seems to be working though.

@joshdoehla thanks for raising the issue. Let me clarify a few points regarding Cloudflare for WordPress plugin detection.

Best way to activate APO with the plugin

I recommend enabling APO feature in WP plugin itself, not in the Cloudflare dashboard. This way you make sure APO and WP plugin integration works. Everything about APO configuration should be done from the “Cloudflare for WordPress” plugin. The ability to enable APO from Cloudflare dashboard is mostly for cases when APO works independently from WP plugin. We explained the difference in the blog post.

How to verify APO and WP plugin integration works?

  • publish a change on the website page.
  • refresh the page 2 times (first time we return stale version of the page from KV)
  • you should see a change and the page should be cached with cf-cache-status: HIT in a response header

Possible reasons why WP plugin is not detected with APO

  • WP plugin version before 3.8.2 is installed ( we need 3.8.2 to detect plugin), remedy - install 3.8.2.
  • WP plugin version 3.8.2 is installed but existing caching plugins returned stale responses (without cf-edge-cache header), remedy- enable APO from WP plugin, purge caches in other plugins
  • WordPress only runs on a subdomain, we check for WordPress and WP plugin against the zone’s root domain. Remedy - liberate subdomain zone and run APO.

How we detect WP plugin is running and compatible with APO

All origin’s responses should return the cf-edge-cache header. Starting from version 3.8.2 cf-edge-cache header is added.

I hope my comments make sense and help all APO users to get the most out of the service.

5 Likes

yevgen-

I’ve done all of that on 2 sites, and both are still showing " cf-cache-status: DYNAMIC"

Sites are updated to 3.8.2, I’ve cleared caches (WP Fastest Cache and Litespeed), Checked again on Cloudfare, still getting the " Note: The WordPress plugin was not detected on" message and still having it come up Dynamic.

Maybe extend dashboard APO toggle to mimic CF Worker Routes, you can enable and then define hostname/routes for it to apply to similar to CF Worker routes tied to specific CF Workers :slight_smile:

?? liberate as in?

So… it seems like it might take a little bit (like 30+ minutes) for the Cloudflare system to detect that you have a Wordpress site b/c now it’s doing the correct flags. (so far it’s only detected it on 1 of the 2 sites though)

1 Like

Maybe extend dashboard APO toggle to mimic CF Worker Routes, you can enable and then define hostname/routes for it to apply to similar to CF Worker routes tied to specific CF Workers
Too complicated, the aim is a simple toggle, we added WP plugin detection and it created so much confusion already.

WordPress only runs on a subdomain, we check for WordPress and WP plugin against the zone’s root domain. Remedy - liberate subdomain zone and run APO.

Sorry for the internal jargon here, I mean if you run example.com and have WordPress site at blog.example.com. The suggested approach is to add blog.example.com as a new zone at Cloudflare and enable APO against it.

when you test APO caching against your websites please add request header “accept: text/html”. We aim every precaution we can not to cache content when it’s not necessary.

1 Like

I think that’s what @eva2000 suspected, but that requires an enterprise plan, right?

Ouch that is a very serious limitation as only Cloudflare Enterprise plans can use a subdomain as a completely separate site zone.

Ouch that is a very serious limitation as only Cloudflare Enterprise plans can use a subdomain as a completely separate site zone.

I will take this feedback to the team and we discuss what other alternatives we can come up with without requiring customer to upgrade to Enterprise plan, thank you for providing it.

2 Likes

Thank you for the detailed response. I had already tried everything on this list - updated CF plugin, removed and reinstalled CF plugin, clear all forms of cache, etc. While this WP install does not run on a subdomain, the root DNS record was a CNAME (for various reasons). I was finally able to have the dashboard recognize the plugin with the following combination of steps:

• Change CNAME record to A and AAAA
• Purge CF cache
• Purge all other caches
• Purge CF cache again
• Click “check again” in dashboard under APO settings

After clearing browser caches and refreshing a few times, I’m getting all HITs on cf-cache-status.
Thank you!

2 Likes

I used a filter ‘the_generator’ in functions.php. Then I commented add_filter(‘the_generator’,…), edit and update front page of site and repeat “Check again” in Cloudflare Backend on Speed tab. Success!

1 Like

If you are using a page cache plugin with WP it may bypass other plugins to load your pages directly from disk cache. In that case the Cloudflare plugin won’t be able to add the cf-edge-cache header to responses and so Cloudflare won’t see the Cloudflare WP Plugin as detected. Either other cache plugin authors need to create some compatibility to add the Cloudflare required header for APO or other disk caching plugins in WP need to be turned off. Unfortunately turning them off is not a good solution because ones like WP Rocket do a lot more than just a disk cache.

1 Like

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