Cloudflare Wordpress Plugin not detected + PATCH request 520 ERROR

Hi,
I followed the Automatic Platform Optimization (APO) configuration procedure carefully and installed Cloudflare Wordpress Plugin (latest version), but the plugin is not detected in my Cloudflare dashboard and I can’t enable APO via the plugin (after refresh the page, the toggle is back Off and a message appears : “cf-edge-cache response header is missing”).
I properly created the API token with the correct permissions and I applied minimum Page rules for Wordpress :

Also, in the Wordpress dashboard > Cloudflare settings, I get “520 errors” on the 3 PATCH requests to myserver/wp-admin/admin-ajax.php?action=cloudflare_proxy

I can’t figure out if PATCH method is allowed by my hosting and I don’t know if this would be the cause of non-detected plugin.
There is no critical error in my PHP logs and I can’t see something wrong in Apache Logs (only GET and POST requests) with 200 status.

Root page Response Header of the plugin page (/wp-admin/options-general.php?page=Cloudflare)
cache-control: no-cache, must-revalidate, max-age=0
cf-cache-status: DYNAMIC
cf-edge-cache: no-cache
cf-ray: 7479b915d954d50a-CDG

520 ERROR - Response Header of /wp-admin/admin-ajax.php?action=cloudflare_proxy
cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
cf-ray: 7479b94c9899d50a-CDG

Please can you bring me your help ?

same problem apart from patch request 520 error.

I started to think if I made a mistake by buying apo. A simple plugin cannot be activated.

You’ve got HTML instead JSON returned :thinking:

Are you using a web browser console, or via curl in some terminal?

May I ask if you have read 520 for tips on how to avoid this error. It may be what’s causing APO not to perform correctly.

https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors#520error

Is your WordPress configured to work over a www or non-www hostname?

I’d suggest you to whitelist your origin host / server / hosting IP address by navigating to the Security → WAF → Tools → IP Access Rules with the action “allow” for your Website and try again.

Before moving to Cloudflare, was your Website working over HTTPS connection?
Kindly, before doing anything at Cloudfalre settings, you could determine if you have a valid SSL certificate installed at the origin host/server by your web hosting provider or your own VPS/dedicated server following the steps from below:

  1. Use the “Pause Cloudflare on Site” option from the Overview tab for your domain at dash.cloudflare.com .
  2. The link is in the lower right corner of that page.
  3. Give it five minutes to take effect, then make sure site is working as expected with HTTPS.
  4. Check with your hosting provider / cPanel AutoSSL / ACME.sh / Certbot / Let’s Encrypt or some other and renew it accordingly.
  5. Only then should you un-pause Cloudflare and double-check your SSL/TLS setting to make sure it’s Full (Strict).

May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?

Here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:

Kindly re-check if Cloudflare is allowed to connect to your origin host within any firewall / contact web hosting provider to as follows in the below article:

Nevertheless, Cloudflare IP addresses list can be found here:

1 Like

Hi guys,

I have just started using Apo but it is not active. I installed the WordPress plugin and connected it with the API token but in vain. what am i missing?

Hi,

I’m having this problem and it doesn’t fix it in any way. What am i missing? I am not using any caching plugin.

Thanks,

anyone here?

May I ask which steps for installation/activation and/or suggestions have you tried to apply for troubleshooting and fixing the issue from the article below? :thinking:

Which APO version are you using? Is it the most recent and updated one?

Could you share your domain name here with us so we could double-check, troubleshoot and provide some feedback information?

Are you also using the official Cloudflare plugin for WordPress?

Have you tried enabling the APO through the Cloudflare plugin / WordPress interface?

Are you using some 3rd-party service/hosting provider?

1 Like

Hi Fritex,

Yes, 520 errors deals with an invalid JSON markup somewhere.
I checked my wp-config.php and functions.php to see if something wrong regarding REST API, there is nothing bad.

Yes, I already followed 520 ERRORS troubleshooting guides + Cloudflare SSL recommandations.
Before activating Cloudflare on my website, I was already with HTTPS and Let’s Encrypt valide certificate.
There is no alert in my Cloudflare dashboard regarding SSL. I’m in FULL mode, I tried to use FULL (STRICT), but it’s the same result.

Question : In section SSL/TLS > Origin Server
There is nothing here.
Do I need to create a Cloudflare certificate for my origin server (even if my hosting already provide a Let’s Encrypt valid certificate) ?

I also tested to toggle my domain from Proxied to DNS ONLY, it’s the same result.
BUT, now the 520 ERRORS reason changed, with “ERR_HTTP2_PROTOCOL_ERROR”.
I tried to disable one by one some features in section SSL/TLS > Edge Certificates
It’s still the same result on my Wordpress dashboard from the plugin settings page.

The solutions you shared are very technical. I disabled the page cache in chrome, but there was no solution.

*Version: 4.11.0
*https://www.gamevcore.com
*yes official wp Cloudflare plugin
*yes tried enabling APO throughthe CF plugin/WP interface.
*i have just local hosting.

Sorry guys, but I would like the answers and support being exclusively reserved to me,as I’m the owner of this topic.

I sent this morning a very complete response to @fritex but my post has been temporarily blocked by Akismet (Cloudflare comment security system).

1 Like

Moderators should see the post, the approve of it!

Lower trust levels/newer members seem to have their posts blocked by it!

Yeah, I think it’s kinda differing from the actual topic myself, but other posts seem to do it

Akismet is NOT owned by Cloudflare; It’s a system through discourse (the software which this lovely community runs through, no that was not sarcasm) and it’s probably thinking your post is spam! As I said earlier, the mods (or a mod) should see the post, then approve it (you’ll be notified and it should show here, if it’s approved)!

1 Like

May I ask, in terms of running on your home network or like localhost XAMPP, etc.? :thinking:

Checking the HTTP headers, I can see you’re running some cache at your origin, which might prevent APO from working? :thinking:

x-cache: HIT from Backend

@fritex
my previous post is now visible, did you saw it ?

1 Like

Any solution to this issue ?

I am testing out and trying to make some connection, as there was lately a topic where Cloudflare throws 520 only on a specific /wp-includes/wlwmanifest.xml file, while the file is existing and not being restricted, therefore the rest of the WordPress is working normally just this particular file 520 :thinking: I wonder if that’s some kind of a sign or case or what else might be that’s happening, anything similar in your case.

After toggle my domain as DNS ONLY (not proxied), I still get 3 errors (520) :
compiled.js?ver=4.11.0:54 PATCH https://myserver/wp-admin/admin-ajax.php?action=cloudflare_proxy net::ERR_HTTP2_PROTOCOL_ERROR

And I can see these logs in the console :
we can see the most correct fetched data and some failed

compiled.js?ver=4.11.0:50  action @@router/LOCATION_CHANGE @ 14:59:14.766
compiled.js?ver=4.11.0:50  action CONFIG_FETCH @ 14:59:14.769
compiled.js?ver=4.11.0:50  action CONFIG_UPDATE_BY_KEY @ 14:59:14.770
compiled.js?ver=4.11.0:50  action USER_LOGIN_SUCCESS @ 14:59:14.771
compiled.js?ver=4.11.0:50  action ZONES_FETCH @ 14:59:14.772
compiled.js?ver=4.11.0:50  action @@router/CALL_HISTORY_METHOD @ 14:59:14.773
compiled.js?ver=4.11.0:50  action @@router/LOCATION_CHANGE @ 14:59:14.776
compiled.js?ver=4.11.0:50  action CONFIG_FETCH_SUCCESS @ 14:59:16.231
compiled.js?ver=4.11.0:50  action CONFIG_UPDATE_BY_KEY @ 14:59:16.233
compiled.js?ver=4.11.0:50  action CONFIG_UPDATE_BY_KEY @ 14:59:16.234
compiled.js?ver=4.11.0:50  action CONFIG_UPDATE_BY_KEY @ 14:59:16.235
compiled.js?ver=4.11.0:50  action CONFIG_UPDATE_BY_KEY @ 14:59:16.236
compiled.js?ver=4.11.0:50  action CONFIG_UPDATE_BY_KEY @ 14:59:16.237
compiled.js?ver=4.11.0:50  action CONFIG_UPDATE_BY_KEY @ 14:59:16.239
compiled.js?ver=4.11.0:50  action CONFIG_UPDATE_BY_KEY @ 14:59:16.240
compiled.js?ver=4.11.0:50  action CONFIG_UPDATE_BY_KEY @ 14:59:16.240
compiled.js?ver=4.11.0:50  action CONFIG_UPDATE_BY_KEY @ 14:59:16.241
compiled.js?ver=4.11.0:50  action CONFIG_UPDATE_BY_KEY @ 14:59:16.242
compiled.js?ver=4.11.0:50  action INTL_FETCH_TRANSLATIONS @ 14:59:16.243
compiled.js?ver=4.11.0:50  action INTL_FETCH_TRANSLATIONS_SUCCESS @ 14:59:16.286
compiled.js?ver=4.11.0:50  action APPLICATION_INIT @ 14:59:16.286
compiled.js?ver=4.11.0:50  action ZONES_FETCH_SUCCESS @ 14:59:17.223
compiled.js?ver=4.11.0:50  action ZONE_SET_ACTIVE_ZONE @ 14:59:17.233
compiled.js?ver=4.11.0:50  action DNS_RECORD_FETCH_LIST @ 14:59:17.235
compiled.js?ver=4.11.0:50  action ZONES_RAILGUNS_FETCH_ALL @ 14:59:17.238
compiled.js?ver=4.11.0:50  action PLUGIN_SETTINGS_FETCH @ 14:59:17.241
compiled.js?ver=4.11.0:50  action ZONE_FETCH_SETTINGS @ 14:59:17.243
compiled.js?ver=4.11.0:50  action ZONES_ENTITLEMENTS @ 14:59:17.245
compiled.js?ver=4.11.0:50  action PLUGIN_SETTINGS_FETCH_SUCCESS @ 14:59:18.789
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "id" values. Using the earlier value. REMOVED-REMOVED-REMOVED-REMOVED REMOVED-REMOVED-REMOVED-REMOVED
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "type" values. Using the earlier value. A TXT
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "content" values. Using the earlier value. XXX.XXX.XXX.XXX google-site-verification=REMOVED-REMOVED-REMOVED-REMOVED
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "proxiable" values. Using the earlier value. true false
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "created_on" values. Using the earlier value. 2022-09-07T21:19:10.113582Z 2022-09-07T21:19:10.111137Z
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "modified_on" values. Using the earlier value. 2022-09-11T12:53:12.817305Z 2022-09-07T21:19:10.111137Z
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "id" values. Using the earlier value. REMOVED-REMOVED-REMOVED-REMOVED REMOVED-REMOVED-REMOVED-REMOVED
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "type" values. Using the earlier value. A TXT
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "content" values. Using the earlier value. XXX.XXX.XXX.XXX REMOVED-REMOVED-REMOVED-REMOVED
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "proxiable" values. Using the earlier value. true false
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "created_on" values. Using the earlier value. 2022-09-07T21:19:10.113582Z 2022-09-07T21:19:10.108355Z
compiled.js?ver=4.11.0:15 When merging two removedremovedremovedremoved, found unequal data in their "modified_on" values. Using the earlier value. 2022-09-11T12:53:12.817305Z 2022-09-07T21:19:10.108355Z
compiled.js?ver=4.11.0:50  action DNS_RECORD_FETCH_LIST_SUCCESS @ 14:59:19.705
compiled.js?ver=4.11.0:50  action ZONES_ENTITLEMENTS_SUCCESS @ 14:59:19.790
compiled.js?ver=4.11.0:50  action ZONES_RAILGUNS_FETCH_ALL_SUCCESS @ 14:59:20.939
compiled.js?ver=4.11.0:50  action ZONE_FETCH_SETTINGS_SUCCESS @ 14:59:22.024
compiled.js?ver=4.11.0:50  action PLUGIN_SETTING_UPDATE @ 14:59:22.050
compiled.js?ver=4.11.0:50  action PLUGIN_SETTING_UPDATE @ 14:59:22.053
compiled.js?ver=4.11.0:50  action ZONE_UPDATE_SETTING @ 14:59:22.055

It’s unbelievable that no Cloudflare engineer can provide an answer to this kind of problem.

Here is a similar topic :

Just in case, kindly, I’d suggest you to write a ticket to the Cloudflare support and share your ticket number here with us so we could escalate your issue. Maybe we can get some more information or maybe there is something being stuck “in the air” :thinking:

You might be offered to switch to the new Customer Support Portal and create a ticket there.

cc

@fritex
Thank you.

I already opened a ticket 2 days ago, ticket ID : 2551982
https://support.cloudflare.com/hc/en-us/requests/2551982

1 Like

I can add that when I temporarily disable Cloudflare, I get the same 520 errors on the Cloudflare plugin setting page

compiled.js?ver=4.11.0:54 PATCH …wp-admin/admin-ajax.php?action=cloudflare_proxy net::ERR_HTTP2_PROTOCOL_ERROR

No serious support from Cloudflare regarding my ticket…

Hello,

Thanks for the update. I have examined your settings, and it appears that the WordPress it not enabled as shown here.

Please follow our guide here.

Please let me know if you need any further assistance.

Yes, despite the Wordpress Cloudflare Plugin is active on Wordpress, the Wordpress Cloudflare Plugin cannot appear as enabled in the Cloudflare dashboard because its not detected, that’s my issue guys…

1 Like