By default WordPress and Cloudflare don’t work well together. Cloudflare will use Flexible SSL, and WordPress will try to enforce HTTPS, but WordPress doesn’t properly detect that Flexible SSL is in use.
There are two ways to fix this:
- Set up full SSL with Cloudflare so WordPress’ HTTPS detection works correctly: How to setup Full SSL with Cloudflare
- Set up WordPress so it can deal with Flexible SSL correctly: How to make Cloudflare Flexible SSL work with WordPress
Going the Full SSL route is recommended because it provides better security.