There are countless guides that will walk anyone through creating a Cloudflare account, installing the plugin and completing the setup on WordPress. This isn’t one of those guides. This is whats next … what to avoid and how to mitigate common issues.
General Cloudflare WordPress Troubleshooting
This goes for almost any issue…the first steps to solving a problem.
First … clear the cache of all files … if this does not resolve your issue turn on Development mode. This completely bypasses the cache. To ensure the firewall or page rules aren’t the source of your issue you may want to temporarily, completely turn off Cloudflare by unselecting the orange cloud in your site DNS records. If the cloud is grey and the issue continues its not Cloudflare. Remember to click the grey cloud turning Cloudflare back on … indicated by an orange cloud.
If your site has an issue and its not Cloudflare it can very easily be another cache. I have a css js combining plugin that creates cached css js files that then are feed to Cloudflare who caches them. Clearing Cloudflare cache doesn’t clear the plugins, so check those as well.
Cloudflare And WordPress Common Issues
- ERR TOO MANY REDIRECTS – If after you turn on caching in Cloudflare you receive a “too many redirects” or it says its stuck in a redirect loop upon trying to visit the site. You may have your SSL settings in Cloudflare set to Flexible. Its not flexible though, your setting suggests the origin server (your server) is not https and so its assuming it needs to access http but if your server IS https its going to then create a redirect loop. It this happens simply change the Cloudflare SSL setting to strict which means https to https. That should do it … until…
- Randomly your site goes down a month or so after Cloudflare goes live using a cPanel hosting account. Well, if this happens its likely because the https cert on the origin server has expired. It generally recertifies the site on its own, but the default cert provider through cPanel verifies your server through DNS TXT records. Wasn’t a problem until you changed DNS to Cloudflare and now cPanel can’t write those TXT records to verify.
You need to install Let’s Encrypt on the WHM end and swap it to providing your SSL they verify the server via an html file which can be done even using Cloudflare.
Alternatively you can set your SSL in Cloudflare to Flexible and turn off the process in cPanel trying to recertify the site. This of course means though that your data is only encrypted between the user and Cloudflare not actually end to end.
- Sometimes with WordPress and Cloudflare you are randomly you are unable to visit your site. Well, its very possible that you’ve used a security plugin in WordPress that has flagged a Cloudflare IP and blocked it. This is why sometimes it works sometimes it doesn’t all depending upon if you’re using that IP this visit or not.
Cloudflare IPs vs. Real IPs
You may notice your logs showing an extremely high amount of traffic among a handful of IP addresses. The following are Cloudflare IPs
If you are only seeing traffic from these addresses your site doesn’t realize its behind a reverse proxy. Installing the Cloudflare plugin is a good first step and if you have a setting in your security or analytics plugins for noting its behind a reverse proxy, you should turn that on. I use WP Cerber and its just a box checked in the General settings.
Incidentally I recommend whitelisting the IP addresses above in all your firewalls after you let them know it’s the reverse proxy.
Your Updates Are Not Showing
It’s the cache. You can clear it through Cloudflare or if you have the plugin installed clear it there. You can also use automatic cache magament so that when you update a post Cloudflare knows to update. This only seems to work if you update the page, not a resource. So if you update an external CSS file you may need to manually purge the old version before the pages will show the difference.
Cloudflare Error 10xx
Cloudflare errors are explained in greater detail in this article.
This post will continue to be updated. If you have a problem feel free to email or comment here about it. Over two years and 300 sites later I’ve probably experienced it if its been on a WordPress site.