Cloudflare works well with WordPress but requires some specific configuration to avoid caching issues and ensure admin areas work correctly.
SSL/TLS Mode
In Cloudflare, set SSL mode to Full (Strict). This requires a valid SSL certificate on your server (provided free by Double Hosting's AutoSSL). Do not use "Flexible" β it causes redirect loops with forced-HTTPS sites.
Bypass Cache for Admin
Create a Cloudflare Page Rule to bypass caching for the WordPress admin: URL pattern yourdomain.com/wp-admin/*, setting: Bypass Cache. This prevents Cloudflare from caching admin pages.
Purge Cloudflare Cache on Publish
Install the official Cloudflare WordPress plugin and add your API token. Enable Automatic Cache Purge β when you publish or update a post, Cloudflare's cache clears automatically.
Restoring Real Visitor IPs
Behind Cloudflare, your server logs show Cloudflare's IP instead of visitors' real IPs. Install the CF Real IP plugin or configure the mod_remoteip Apache module to restore real IPs for accurate analytics and security logs.