Disclosure: CyberNaira content is reader-supported. This means if you make purchases through our affiliate links, we may earned commission but at no additional cost to you. 

Does WP Rocket work with Cloudflare CDN services?

Yes, WP Rocket is 100% compatible with Cloudflare, and this article shows you how to use WP Rocket with Cloudflare CDN on your website.

Using WP Rocket with Cloudflare could bring faster page speed and boost performance significantly.

Though WP Rocket has its premium CDN service, Rocket CDN, it makes sense to go with Cloudflare for customers already with Cloudflare who want to use WP Rocket on their WordPress blog.

How to Integrate WP Rocket With Cloudflare

If you prefer a video tutorial, this might be useful…watch this.

For step-by-step instructions, read on…

First, you need a Cloudflare account to use WP Rocket and Cloudflare. Without that, it will be impossible to use the two together.

So, if you don’t have a Cloudflare account set up already, head over to the Cloudflare homepage to signup for a free account.

You only need an email address and a unique password to sign up for a Cloudflare account.

Cloudflare offers a basic free account for its users. However, there are premium plans if you require more CDN, performance, security, and cache functions for your website.

The free Cloudflare account is suitable for use with WP Rocket.

Now that you have a Cloudflare account, your website domain has been added to Cloudflare; let’s integrate the WP Rocket plugin with Cloudflare CDN (content delivery network).

The next thing you need to do is change your domain Name Servers to the Cloudflare DNS. You can do this from your domain name registrar level.

This is not hard; you will find all the necessary information on this page.

Whether you use WP Rocket or not, Cloudflare will be active for your site once your website is added and the domain name server changes to that of Cloudflare.

The Cloudflare name server looks something like this:

Cloudflare name server in namecheap

It may take 24 hours for the name server changes to take effect. So you might not proceed with the configuration immediately.

Configuring Cloudflare Add-on

Using the WP Rocket Cloudflare add-on will make things simpler and more convenient to configure. However, it is not a requirement but an easier way to go through the process.

You will need your Cloudflare API for this setup.

To get your Cloudflare API, follow these steps:

Log into your Cloudflare account. Click on the website (if you have more than one website with Cloudflare) you want to use with WP Rocket.

selecting website in Cloudflare

On the next open page, scroll down and look for “Get your API token” under the API menu.

On the next tab, click “API Tokens” from the menu tab. Scroll down and click on “View” from the Global API field.

getting API in cloud flare dashboard

A pop-up dialog box requires your Cloudflare password for security purposes, and a security question is needed.

Once you have supplied these requirements, you can view and copy your Global API into the appropriate WP Rocket setting page field.

In the WP Rocket add-on setting page, you’ll see the Cloudflare add-on status switch; you need to toggle this to on.

WP Rocket add-on Cloudflare switch

Then click on the “Modify Option” button on the page.

This action will open up the Cloudflare tab under the add-on tab.

Global setting Cloudflare

You need to set these three settings in the Cloudflare add-on tab:

  • Global API
  • Account email
  • Zone ID

I already covered how to get your Global API from your Cloudflare account.

To get your account Zone ID, log in to your Cloudflare account and click on Overview from the top menu icons on the page.

Scroll down; you will see it there…

Zone ID setting page in Cloudflare

You might want to play other Cloudflare settings within the WP Rocket. Like the development mode.

And the Optimal setting option. Relative Protocol

Other setting options in WP Rocket

Let’s walk through each setting option one after the other.

Development Mode

This option lets you toggle the Cloudflare development mode on/off. So you can safely temporarily suspend Cloudflare edge caching and the minification features.

The Cloudflare development mode helps view real-time changes to cache-able content like images, CSS, and JavaScript files.

Optimal Setting

This is useful for selecting a pre-defined performance option for improving your site through Cloudflare.

This option set:

  • Cloudflare browser cache to 1 year.
  • The Cloudflare minification features on.
  • It deactivates the rocket loader.
  • Cloudflare cache level to standard

Relative Protocol

If you need to re-write the URL of static files, then this option becomes valid. Otherwise, it only needs to be toggled on if you use Cloudflare’s flexible SSL features.

Never use these features if your WordPress blog runs on full SSL protocol. It may break your website functionalities.

Other WP Rocket Settings to Consider

Cloudflare CNAME

Since Cloudflare is a CDN for your domain name, you don’t need to configure this in the WP Rocket CDN tab.

You don’t need to enter the Cloudflare CNAME there.

FAQ – WP Rocket And Cloudflare CDN

Can I use WP Rocket with Cloudflare?

Yes, you can use WP Rocket with Cloudflare without any compatibility issues. The two software work together to improve website performance and boost page speed.

Does WP Rocket have CDN?

Yes, WP Rocket has its CDN called RocketCDN. It works straight out of the box with the WP Rocket plugin and can be activated from your dashboard.

Is Rocket CDN any good?

RocketCDN is powered by the Stackpath API, which means you’ll get the same quality CDN services offered by Stackpath.

You’ll also get an additional 50 edge locations to distribute your content.

How do I add Cloudflare CDN to my WP Rocket?

Follow the step-by-step guide in the content above to set up Cloudflare CDN services with your WP Rocket plugin.

If you’re stuck on any of the processes, you can review the content again.

Summary…

WP Rocket is unarguably the most widely used WordPress cache plugin. And Cloudflare is undoubtedly one of the most popular CDN solutions today.

So, using the two speed and performance solutions will make a BIG difference in your site performance.

Similar Posts

7 Comments

  1. Thank you for this tutorial. I just configured my site using this guide. You guys are the best.

    1. Hi, Humphrey,

      Good to read this tutorial helps you configure your site better. Let me know if you need further help.

  2. Great post for me. Before this, I have never listened to Cloudflare & WP rocket. WP Rocket is such a nice thing. I enjoy the post. It is too great. Keep sharing new terms and thanks.

    1. Hi, Raunak,

      Using WP Rocket alongside Cloudflare would bring significant improvement to page speed. Both work to make your web pages load faster. Thanks for reading.

  3. Hi Shamsudeen,

    It was an amazing read! I love WP Rocket, and it is one of my go-to tools for everything. I have recommended this tool to so many people, and they just keep thanking me for the same. I recently suggested this to a friend who uses Cloudflare, I think this article will help him set up and understand the services better. I will share this article with him to make sure he can transition with ease. Thanks a lot for sharing this resource, it was a great help.

    1. Hi, John,

      Good to read you love WP Rocket and you’ve been using it, and thanks for the recommendation to a friend. Let me know if there is any way I can be of help? Thank you.

  4. Hi,
    Thanks for the tutorial, helped a lot.
    I’m a afraid having to configure the Cloudflare “Global API” key in WP Rocket plugin. Why does it need the Global API Key? Would it not sufice a user level API Token with cache_purge rights?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.