Article directory
When testing on Linux servers, the WordPress admin panel and login page load much more slowly.
WordPress background CSS styles cannot be loaded, HTML pages without CSS styles are very ugly!
Why investigate?CloudflareIs a 524 error being displayed?
When I looked at the browser console, I noticed that 3 key CSS styles were not being loaded and all had error code 524.
I immediately suspected the WordPress caching plugin was the culprit, so I started clearing all my cache. However, this didn't solve the problem. I then tested clearing all the cache and disabling the WordPress plugin , but the problem persisted.
I disabled my firewall and used a different browser, suspecting that the browser cache is the culprit, but the problem persists.
Over time, things got worse as the site would become unreachable and a Cloudflare "timeout occurred" error page with error code 524 ▼

Then, doing a quick search for this particular error code, it's clear it's completely Cloudflare related.
Realizing this, I tried clearing the cache again, but unfortunately that didn't fix the problem, so tried turning off Cloudflare's CDN proxy, which would make all traffic go through my server instead of going through the Cloudflare CDN in the first place.
After doing this, the error unexpectedly disappeared.
The website no longer has the Cloudflare 524 error code, but one of the side effects of this is that the site is now insecure because the site had been using Cloudflare's SSL certificate.
In fact, the browser can't even load the website because it's actually a BAD CERTIFICATE error.
I'm to blame here, though, as I don't remember installing a new Let's Encrypt SSL certificate after the migration.
So with Cloudflare suspended, my website was using the server's SSL certificate, which of course didn't match my domain name, hence the error.
However, we can quickly resolve this issue by installing a new certificate in the CWP control panel .
What's causing the Cloudflare 524 error?
The website is now up and running as usual, but turning off Cloudflare loses the benefits of the CDN as enabling the Cloudflare CDN just throws the error again.
I was eager to have the site use the Cloudflare CDN, so I googled for a solution.
At least this time I know what to search because I have no doubts that Cloudflare is causing the bug.
Indeed, I found many similar victims on the Cloudflare community page.
Unfortunately, most of them are closed unresolved.
However, when I stumbled upon a quick fix for Cloudflare's timeout issue.
The sixth of the 6 quick fixes listed there, successfully resolved the issue▼

Your hosting provider has made server changes to their Railgun settings which resulted in Error 524. Go to the Cloudflare dashboard, select Speed, Railgun and either disable Railgun if it is no longer supported by the provider or test & select a working connection from the list of options.
- Your hosting provider made server changes to their Railgun settings that resulted in error 524.Go to the Cloudflare dashboard, select Speed, Railgun, disable Railgun if the provider no longer supports it, or test and select an option for a working connection from the list.
How to Fix Cloudflare 524 Error Quickly?
Railgun was activated inadvertently due to my previous speed settings in Cloudflare.
If the site is hosted on a server that doesn't support the feature, but the option is activated, the WordPress site will experience a Cloudflare 524 error...
Long story short, disabling Railgun quickly fixed the issue, and the site is now back on Cloudflare ▼

- But when we encounter problems, as long as we don't give up and use Google search to find the answer, the problem will be solved in the end.
- It is very rewarding to overcome difficulties successfully!
Hopefully, the article "Solving Cloudflare Error 524: WordPress Backend CSS Styles Cannot Load" shared on Chen Weiliang's blog ( https://www.chenweiliang.com/ ) will be helpful to you.
Feel free to share this article's link: https://www.chenweiliang.com/cwl-28604.html
