Hello, I know that this is not the right place for this problem, but Cloudflare Community does not answer, I think the people here are knowledgeable, so I will explain my problem: Cloudflare is installed on my site and works with SSL flexibility, but the problem is that if “always use HTTPS” is turned on, my wordpress site’s settings are http, so it logs in to the site as http, of course it gives a warning that it is not secure, but it works. If I change my wordpress urls to https, the site crashes. When I turn off “always use HTTPS” from Cloudflare, the site connects to both https and http and works, but this time the css file is canceled, I don’t understand. I am sure that this forum has the information to solve this problem.
Yes, I do, and doing this WILL solve your problem.
The key issue is that flexible SSL causes strange issues with WordPress (as you already experienced.)
Visiting via HTTP works, because WordPress sees that the set URL and the actual URL match, and all is good.
But once you enabled forced HTTPS, then while you can still visit the site, WordPress still tries to load the website files over HTTP which is perceived as insecure by most browsers and will be thus blocked ("css file is canceled), effectively breaks your site.
And if you did change the site URL to HTTPS, then while you think it’s under HTTPS, WordPress only sees HTTP connection from Cloudflare and will try to redirect you to HTTPS. Of course, it never works, because flexible only sends HTTP requests to the origin server. And this will just break your entire site.
The solution? Exactly what I shared with you above. Set up full SSL and everything should work fine with HTTPS.
Other solutions do exist, but setting up full SSL is the most straightforward one (in my opinion).