Basically, CloudFlare creates a complete copy of your website and stores it to their servers. You can setup rules in CloudFlare to not cache certain pages such as the Cart, Checkout, Etc.
In short, it’s basically two servers and each one uses there own SSL Certificates.
CW - Let’s Encrypt
CF - Universal SSL
Honestly, it’s hard to find detailed documentation on this subject. I’m not an expert, so try this at YOUR OWN RISK.
BACKUP YOUR SERVER AND WORDPRESS BEFORE YOU DO ANYTHING OR USE A NEW SERVER
This is mainly for SSL on CloudFlare. Getting the right CloudFlare configuration requires testing and tweaking each setting manually.
Here’s a link to a useful CW and CF CDN integration. https://community.cloudflare.com/t/how-do-i-migrate-a-cloudflare-enabled-site-to-cloudways/8562/3
- If you are using Woocommerce you need to manually check if the Cart, Checkout, and User Account pages are working correctly.
1. In the CloudFlare DNS section add two A Records, one for WWW and the other for yourdomain.com. Point them both to your CW Server IP Address and select a TTL of 10 Minutes.
2. It is not possible to create Let’s Encrypt certificates in Cloudways while the CloudFlare CDN is active, so turn it off by clicking the Orange Cloud. When you see a Grey Cloud it means CloudFlare CDN is off.
3. Go to your Cloudways Server WordPress and add your Primary Domain in Domain Management Section. You must use www.yourdomain. com
4. In your Cloudways Server WordPress install Let’s Encrypt certificates for your domain. Both non-www and www.
5. Login to your Database Manager in Cloudways Server WordPress and search/replace all http entries to https for all images/posts/links. If you see a link without http:// OR https:// LEAVE IT ALONE.
6. Go back to your server and under Settings & Packages / Advanced Tab find WAF Module and change it to CloudFlare.
7. Go to CloudFlare DNS section click on the Grey Cloud to turn on the CDN for both WWW and yourdomain A Records. (Orange Cloud = CDN is on)
8. Go to CloudFlare Crypto Section and turn SSL to Flexible. Wait up to 24 hours for a CloudFlare SSL Certificate. If you have used CloudFlare with the same domain you already have one. (No wait time, the status will say “Active Certificate”)
9. After the CloudFlare SSL is active you can change it to Full Strict.
10. Make sure your pages are working correctly.
AGAIN, I’m not an expert, so try this at YOUR OWN RISK. This is what I have done to make my WordPress website work with Cloudways and CloudFlare CDN.