Chat with us, powered by LiveChat

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How to Install Cloudflare CDN on WordPress

July 3, 2018

6 Min Read
cloudflare on wordpress
Reading Time: 6 minutes

Speed and security are the most important aspects that a WordPress website needs. There are a lot of articles on the web talking about increasing the security and speed of WordPress. For this sole reason, we have spent numerous days and nights (and donuts) in building one of the most impressive managed cloud hosting platform for hosting WordPress sites.

However, hosting service provider is not the only factor in improving the speed of your WordPress site. Another common method used to improve the speed of a site is by using a CDN, which stands for content delivery network. It is a network of servers that serves the web content of websites based on geographic distance of visitors on the site. Using a CDN improves the page loading time for visitors coming in from different regions to access your website.

CDN typically deliver static, dynamic and media content and depending on your CDN provider other services such as security, optimization and SSL are also added. Websites using a CDN service can minimize latency at user’s end as their content is cached and delivered from the nearest server.

In this tutorial, I will be sharing how you can install CloudFlare on WordPress website using Cloudways.

Features of WordPress Cloudflare CDN

Cloudflare CDN is a renowned CDN provider with servers spread all over the globe to serve the content of your website to every corner of the World. Cloudflare offers multiple features depending on the plan you are signed up for.

Smart Routing

This is a smart way of routing traffic through the fastest network available. It utilizes an algorithm which uses real-time network intelligence to decide which path is the fastest.

Stream Delivery

A lot of websites stream media which can take a lot of time to load if accessed from the other corner of the region. To solve this problem, Cloudflare CDN offers a special caching mechanism to deliver stream files through its 152 data centers.

Load Balancing

Cloudflare offers usage-based and base fee pricing for load balancing. Usage-based is calculated on the number of requests made to the DNS server by the visitor. While the basic fee is calculated on the number of origin servers.

Global load balancing ensures the availability of dynamic content to visitors from origin servers.


Cloudflare on WordPress offers an advanced caching mechanism which includes saving the static content automatically, cache purging and tiered caching.

We have seen that a typical website uses both dynamic and static content and using CloudFlare can save you both CPU and bandwidth juice of your web hosting by serving this content using its own servers. CloudFlare on WordPress can reduce the latency on the end user and enhance the overall user experience.


At times we need to integrate third-party tools and APIs for a specific functionality. These resources are not in our control and if not configured properly can cause lags.

Cloudflare on WordPress site optimizes the web page automatically by minimizing the number of network connections. This prevents third-party resources from slowing down the web page.

Accelerated Mobile Pages

Accelerated Mobile Pages is a technique to load web pages faster on mobile devices when search from Google search engine. It has been observed that more and more users are getting on the web on their mobile devices than from desktop computers.

Cloudflare CDN accelerated mobile links are powered by AMP and load AMP enabled web pages inside the viewing window 3 times faster than the normal mobile pages.

Cloudflare providers a number of options like CDN, optimization of ads, DDoS security, analytics and much more. They also offer a free plan that you can use before purchasing a paid plan.

The widely used CDN providers by WordPress users are MaxCDN and Cloudflare. In this tutorial, I will be sharing how you can install Cloudflare on a WordPress website in Cloudways.

Cloudflare providers a number of options like CDN, optimization of ads, DDoS security, analytics and much more. They also offer a free plan that you can use before purchasing a paid plan.

CloudFlare CDN for WordPress Account Activation

To install Cloudflare, you first need to signup for Cloudflare and then add your website.


Cloudflare will scan your domain for DNS details.


Next, you can route CNAME, A records, among others to route through Cloudflare servers by clicking on the gray cloud.



Once done, Cloudflare will ask about the plan that you want to avail. For this tutorial, we are going to go with the FREE plan.


In the final step, Cloudflare will notify you which DNS you need to change in order to configure Cloudflare with your domain.


Next step is to log in to your domain registrar and edit the DNS records of your domain and replace them with the ones Cloudflare has provided.

After you have edited the DNS records, click Continue and after a while, you will receive an email confirming that your domain is using Cloudflare DNS and is now being optimized. In your Cloudflare dashboard, the status will change to “Active” and many options will be available in the top pane to configure various security and performance related tasks.

To take full advantage of Cloudflare on WordPress website, it is recommended that you install their plugin on your website.

Adding Let’s Encrypt Certificates to Cloudflare

With Cloudways you can create SSL certificate for your WordPress site using Let’s Encrypt. It can not be created while Cloudflare is activated on your domain. In order to activate Let’s Encrypt certificate, follow the steps below:

1. Login to your Cloudflare dashboard and under DNS tab, disable both www and options by using the toggle switch in front of it. Grey cloud means that the service is disabled.

2. Go to your Cloudways dashboard and under WordPress application; go to SSL Certificate Enter your domain and install Let’s encrypt certificate.

SSL Screen CW

3. Now, go to your server dashboard and Settings and Packages tab inside Advanced tab, enable HTTP/2 option and under WAF Module choose Cloudflare.

4. Go back to Cloudflare dashboard and enable the option we disabled in step 1. Click on the Crypto tab at the top and turn SSL to Flexible. It can take up to 24 hours for Cloudflare to activate the certificate. However, if you already have used the same domain before, it will get activated instantly.

Once the certificate is activated, switch it to Full (strict).

Now, go back and enable both www and options inside the DNS tab.

That’s all! You get a whole bunch of options after you have configured Cloudflare on your WordPress site. Most of the options are for paid plans but if it helps then we recommend that you upgrade your plans and take full advantage of it!

Final Thoughts

Cloudflare on WordPress does not only improves the experience of user visiting your site but it also saves the valuable CPU and bandwidth resources of your web server. It is highlight optimized CDN that can completely take away the worry of latency and with a variety of plans available you can choose the best suits your budget.

Frequently Ask Questions (FAQs)

Is Cloudflare a hosting provider?

No, CloudFlare CDN is a content delivery network provider which offers CDN services. Websites using their services have access to their huge network of servers through which it serves the static and dynamic content of the site minimizing latency at the user end.

What is The Difference Between MaxCDN and Cloudflare?

Cloudflare comes with an option of a free plan while MaxCDN does not. Cloudflare is easy to set up and also offers website security while MaxCDN can be set up using the W3 Total Cache plugin and is used by renowned businesses.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Start Growing with Cloudways Today!

We never compromise on performance, security, and support.

Ahsan Parwez

Ahsan is the Community Team Manager at Cloudways - A Managed Cloud Hosting Platform. He loves to solve problems and help Cloudways' clients in any aspect he can. In his free time, you can find him playing RTS PC games.

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!