I’m trying to change the WordPress Address (URL) and Site Address (URL) to HTTPS on the WordPress general settings but it was not possible. I have tried .htacess without success. I using Cloudflare.
Please note that Cloudflare and WordPress don’t play well together out of the box, because the built-in HTTPS detection in WordPress doesn’t work with Cloudflare’s Flexible SSL.
I recommend to setup Full SSL instead, which will secure the connection between Cloudflare and your site, and will help WordPress detect that HTTPS is in use:
Alternatively, you can configure WordPress to correctly detect flexible SSL: