Using CloudFlare with WordPress

If you purchase through a link on our site, we may earn a commission. Learn more.

We've recently started using the CloudFlare service on WPMayor, and are very happy with it. For those who haven't heard of it yet, CloudFlare is a FREE system that acts as a proxy between your visitors and our server. By acting as a proxy, CloudFlare caches static content for your site, which lowers the number of requests to our servers, but still allows visitors to access your site.
Table of Contents
WP Engine High Performance Hosting
BionicWP Hosting

We’ve recently started using the CloudFlare service on WPMayor, and are very happy with it. For those who haven’t heard of it yet, CloudFlare is a FREE system that acts as a proxy between your visitors and our server. By acting as a proxy, CloudFlare caches static content for your site, which lowers the number of requests to our servers, but still allows visitors to access your site.

[youtube width=”640″ height=”390″]http://www.youtube.com/watch?v=0XZOecsbnKo&feature=related[/youtube]

There are several advantages of the CloudFlare system:

  • Site performance improvement
    CloudFlare has proxy servers located throughout the world. Proxy servers are located closer to your visitors, which means they will likely see page load speed improvements as the cached content is delivered from the closest caching box instead of directly off our server. There is a lot of research that shows that a faster a site, the longer a visitor stays.
  • Bot and threat protection
    CloudFlare uses data from Project Honey Pot and other third party sources, as well as the data from its community, to identify malicious threats online and stop the attacks before they even get to your site. You can see which threats are being stopped through your CloudFlare dashboard here: .
  • Spam comments protection
    CloudFlare leverages data from third party resources to reduce the number of spam comments on your site.
  • Lower CPU Usage
    As fewer requests hit your server, this lowers the overall CPU usage of your account.
  • New Site Stats
    You have good tools to evaluate human traffic coming to your site, but no insight into search engine crawlers and threats. With CloudFlare, now you do.

Where as most WordPress caching plugins focus on optimizing your database and server, CloudFlare optimizes at the network level. CloudFlare has partnered with the popular W3 Total Cache plugin and is included as an option in W3 Total Cache (W3TC). CloudFlare caches common static content file extensions, including JavaScript, CSS and images. The full list of what CloudFlare caches can be found here.

CloudFlare and W3TC’s missions are aligned: making sites perform as fast as possible. W3TC runs on your server and helps optimize your database and content production. After that, CloudFlare takes over and our globally distributed network ensures your site’s content is delivered as fast as possible while, at the same time, preventing attacks from harming your site.

While W3TC and CloudFlare have always worked synergistically, you can now manage several of the CloudFlare features directly from the W3TC control panel. The W3TC plugin now also will also ensure that your visitors’ IP addresses appear correctly in WordPress without your needing the CloudFlare WordPress plugin or the mod_cloudflare Apache module.

You can download the latest version of the W3TC and get the full CloudFlare integration. If you’re already a CloudFlare user, you’ll just need to enter your account information and API Key, which you can find on your CloudFlare Account page. If you haven’t yet signed up for CloudFlare, simply follow the sign up link from the W3TC interface and you can be up and running in about 5 minutes.

If you are using the CloudFlare WordPress plugin, you should currently use both plugins. The W3TC plugin doesn’t include the spam reporting functionality. We are working with the authors to get the spam reporting functionality incorporated.

If you are using the W3 Total Cache plugin, make sure to enter your Cloudflare details in the settings section. If you activate CloudFlare through W3TC, then you do not need to use the CloudFlare WordPress plugin as well.

Check out this tour of CloudFlare services if you’d like to know more about it.

Are you using Cloudflare on your WordPress site? Let us know what your experience has been, and if you’re not, we encourage you to give it a try!

If you enjoyed this post, make sure to subscribe to WPMayor’s RSS feed.

Jean Galea

Jean Galea is an investor, entrepreneur, and blogger. He is the founder of WP Mayor, the plugins WP RSS Aggregator and Spotlight, as well as the Mastermind.fm podcast. His personal blog can be found at jeangalea.com.

Discover more from our archives ↓

Popular articles ↓

16 Responses

  1. I’ve been using CloudFlare on a couple of my sites for about 12 months on the Pro level.

    It was very easy to set-up. Their install wizard guides you through. Generally it has worked well, protecting the server and reducing load.

    On sites that have not been optimized it can have a dramatic effect on load times and responsiveness of site. The free level is certainly an easy and cheap way to get some cdn.

  2. Hi,

    I would recommend excluding the admin section of the site with a PageRule. Details here:

    Some performance features can inadvertently impact features in admin backends.

  3. Hi,

    Nice article. I just started using CloudFlare from my host provider, DreamHost. One click and it was all done. I also run W3TC and gave it my CloudFlare credentials. Ever since then, the frontend does seem to load faster, but the admin screens seem to be slower than before. Has anyone else experienced this?

  4. How does this work in relation to the european cookie law? Does it use 3rd party cookies? How do I avoid this to stay compliant?

    1. I’m asking the guys from Cloudflare to check out this post and give us their input, as it’s best that answers about compliance come from them.

    2. We currently don’t have a solution for the EU cookie law. We will likely build an app to help users address these issues in that region.

  5. Hi! Can you tell me do you know how Cloudflare service is working with WP web shop plugins (e.g. Jigoshop)? Namely, web shop plugins don’t “like” much caching plugins (like W3 Total Cache), in fact they can’t work together at all, according to peoples’ experiences.

    1. Haven’t tested that Ivica, I’m asking the guys from Cloudflare to check out this post and give us their input.

      1. Thx Jean, this is very nice from you… that info will help us in further decisions on possible usage of Cloudflare services…

    2. “Hi! Can you tell me do you know how Cloudflare service is working with WP web shop plugins (e.g. Jigoshop)? Namely, web shop plugins don’t “like” much caching plugins (like W3 Total Cache), in fact they can’t work together at all, according to peoples’ experiences.”

      Should be fine because we’re not a plugin (we cache static content by file extension type). The primary concern would be SSL, if you’re using it, which would require upgrading to a Pro account for SSL to work. You would also want to install the CloudFlare WordPress plugin to make sure original visitor IP is restored at WP level.

      1. Thank you Damon for your answer. We can try and see how it is going… BTW, we are not using SSL.

  6. Interesting article, Jean. So basically you need to change DNS servers if you want to enable the Cloudflare service? What I don’t understand though is that if you route everything through them, how will your databases be updated then or am I having a brain failure now and am I completely mixing things up?

    1. Your mysql databases won’t be affected at all by such a change. The DNS is only responsible for fetching the IP address of your server from the domain name.

    2. “What I don’t understand though is that if you route everything through them, how will your databases be updated then or am I having a brain failure now and am I completely mixing things up?”

      You still update these as you do today (through your hosting provider). Your hosting provider doesn’t change if you’re using CloudFlare in front of your site.

Share Your Thoughts

Your email address will not be published. Required fields are marked *

Claim Your Free Website Tip 👇

Leave your name, email and website URL below to receive one actionable improvement tip tailored for your website within the next 24 hours.

"They identified areas for improvement that we had not previously considered." - Elliot

By providing your information, you'll also be subscribing to our weekly newsletter packed with exclusive content and insights. You can unsubscribe at any time with just one click.