I’m unable to activate the APO feature from my Wordpress website or the Clouflare console. I have tried different API keys and created new ones to eliminate that as a cause. The Cloudflare console gives me the error message 'Note: The WordPress plugin was not detected on ‘mywebsitename’
I have deactivated plugins but nothing has solved the problem. This is my current WordPress environment:
Webserver: IIS 10
PHP: 8
Wordpress: 6.2
Active Plugins:
Cloudflare - 4.11.0
Elementor - 3.13
Elementor Pro - 3.12.3
JetEngine - 3.1.4 (it comes with many addons)
Rank Math SEO - 1.0.112
Rank Math SEO PRO - 3.0.34
UpdraftPlus - Backup/Restore - 2.23.3.1
WP Mail SMTP - 3.8.0
All In One WP Security - 5.1.8
Is the domain itself proxied by Cloudflare? You can check that by visiting Cloudflare Dashboard > DNS and checking the A records for your root domain, and see that it is , and not .
I’ve disabled as many plugins as possible without disabling site functionality. My complete list of plugins is listed above. Do you see any that may be causing a problem?
I’m using the global API key now. I still am not connecting to Cloudflare.
Clicking Apply Recommended Cloudflare Settings for WordPress in the Plugin results in the spinner spinning forever.
The Automatic Platform Optimization for WordPress section in Cloudflare optimization still displays the message:
Note: The WordPress plugin was not detected on touchofjapan.com.
I just tried to connect one of our development sites to Cloudflare with the plugin. I disabled and deleted all plugins except Cloudflare. The behavior is the same as above:
Clicking Apply Recommended Cloudflare Settings for WordPress in the Plugin results in the spinner spinning forever.
The Automatic Platform Optimization for WordPress section in Cloudflare optimization still displays the message:
Note: The WordPress plugin was not detected on touchofjapan.com.
Could this be a web server problem? We’re using IIS 10.
No, but if you have already tested disabling them, they shouldn’t be the issue.
Can you please visit your /wp-admin/ area and open the Cloudflare plugin page with Developer Tools open (F12), and see if there are any errors? Check both the Network and Console tabs for any issues that may somehow involve the Cloudflare plugin.
to load resource: the server responded with a status of 405 ()
/wp-admin/options-ge…=Cloudflare#/home:1 Uncaught SyntaxError: Unexpected token ‘<’, "<!DOCTYPE "... is not valid JSON
at JSON.parse ()
at Object.callback (compiled.js?ver=4.11.0:15:1834)
at compiled.js?ver=4.11.0:54:57512
at g.callback (compiled.js?ver=4.11.0:54:63989)
at g. (compiled.js?ver=4.11.0:54:60804)
at r.emit (compiled.js?ver=4.11.0:54:67409)
at n.onreadystatechange (compiled.js?ver=4.11.0:54:64844) /wp-admin/admin-ajax.php?action=cloudflare_proxy:1 Failed to load resource: the server responded with a status of 405 () /wp-admin/options-ge…=cloudflare#/home:1 Uncaught SyntaxError: Unexpected token ‘<’, "<!DOCTYPE "... is not valid JSON
at JSON.parse ()
at Object.callback (compiled.js?ver=4.11.0:15:1834)
at compiled.js?ver=4.11.0:54:57512
at g.callback (compiled.js?ver=4.11.0:54:63989)
at g. (compiled.js?ver=4.11.0:54:60804)
at r.emit (compiled.js?ver=4.11.0:54:67409)
at n.onreadystatechange (compiled.js?ver=4.11.0:54:64844) /wp-admin/admin-ajax.php?action=cloudflare_proxy:1 Failed to load resource: the server responded with a status of 405 () /wp-admin/options-ge…=cloudflare#/home:1 Uncaught SyntaxError: Unexpected token ‘<’, "<!DOCTYPE "... is not valid JSON
at JSON.parse ()
at Object.callback (compiled.js?ver=4.11.0:15:1834)
at compiled.js?ver=4.11.0:54:57512
at g.callback (compiled.js?ver=4.11.0:54:63989)
at g. (compiled.js?ver=4.11.0:54:60804)
at r.emit (compiled.js?ver=4.11.0:54:67409)
at n.onreadystatechange (compiled.js?ver=4.11.0:54:64844)
compiled.js?ver=4.11.0:50 action ZONES_RAILGUNS_FETCH_ALL_SUCCESS @ 19:53:23.481
DevTools failed to load source map: Could not load content for https://jpconnection.dev/wp-content/plugins/cloudflare/stylesheets/components.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
From the network
to load resource: the server responded with a status of 405 ()
/wp-admin/options-ge…=Cloudflare#/home:1 Uncaught SyntaxError: Unexpected token ‘<’, "<!DOCTYPE "... is not valid JSON
at JSON.parse ()
at Object.callback (compiled.js?ver=4.11.0:15:1834)
at compiled.js?ver=4.11.0:54:57512
at g.callback (compiled.js?ver=4.11.0:54:63989)
at g. (compiled.js?ver=4.11.0:54:60804)
at r.emit (compiled.js?ver=4.11.0:54:67409)
at n.onreadystatechange (compiled.js?ver=4.11.0:54:64844)
/wp-admin/admin-ajax.php?action=cloudflare_proxy:1 Failed to load resource: the server responded with a status of 405 ()
/wp-admin/options-ge…=Cloudflare#/home:1 Uncaught SyntaxError: Unexpected token ‘<’, "<!DOCTYPE "... is not valid JSON
at JSON.parse ()
at Object.callback (compiled.js?ver=4.11.0:15:1834)
at compiled.js?ver=4.11.0:54:57512
at g.callback (compiled.js?ver=4.11.0:54:63989)
at g. (compiled.js?ver=4.11.0:54:60804)
at r.emit (compiled.js?ver=4.11.0:54:67409)
at n.onreadystatechange (compiled.js?ver=4.11.0:54:64844)
/wp-admin/admin-ajax.php?action=cloudflare_proxy:1 Failed to load resource: the server responded with a status of 405 ()
/wp-admin/options-ge…=Cloudflare#/home:1 Uncaught SyntaxError: Unexpected token ‘<’, "<!DOCTYPE "... is not valid JSON
at JSON.parse ()
at Object.callback (compiled.js?ver=4.11.0:15:1834)
at compiled.js?ver=4.11.0:54:57512
at g.callback (compiled.js?ver=4.11.0:54:63989)
at g. (compiled.js?ver=4.11.0:54:60804)
at r.emit (compiled.js?ver=4.11.0:54:67409)
at n.onreadystatechange (compiled.js?ver=4.11.0:54:64844)
compiled.js?ver=4.11.0:50 action ZONES_RAILGUNS_FETCH_ALL_SUCCESS @ 19:53:23.481
DevTools failed to load source map: Could not load content for https://jpconnection.dev/wp-content/plugins/cloudflare/stylesheets/components.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
I think you’ve now found what the problem is. All the errors above derive from: Failed to load resource: the server responded with a status of 405 (). Your server for some reason is not accepting some requests made by the Cloudflare plugin, which in turn creates a chain of events that results in your Cloudflare plugin never being able to function properly.
When the Cloudflare plugin is installed correctly, all your frontend pages and posts should have a header that it adds:
cf-edge-cache: no-cache returned when visiting the site while logged in. cf-edge-cache: cache,platform=wordpress returned when visiting while not logged-in.
These headers are added regardless of APO, as long as the plugin is installed and properly running. Your website is not returning those headers.
Now I think you were right in your earlier suspicion. Your server somehow seems not to be accepting HTTP method PATCH or something.
This is not an issue we can help you in this community, as each server has its own technical complications. You need to reach out to your developer or hosting provider and ask them why is it that the server is behaving that way. Perhaps some configuration error.
Thank you for your help. I’ve been chasing this IIS CORS problem for many hours. Unfortunately, I haven’t found the solution yet. I’ll share my solution when/if I find it.