How To Setup The Cloudflare CDN For WordPress On Your hosting Dashboard or Cloudflare Account

How To Setup The Cloudflare CDN For WordPress On Your hosting Dashboard or Cloudflare Account

If you’re like most web developers, speed and security are the most important aspects that a WordPress website needs. Along with other known techniques such as using optimized images and a cache plugin, using CloudFlare CDN (content delivery network) is a highly recommended approach to increase your website’s load speed as well as search engine rankings.

In this tutorial, we shall show you how to setup Cloudflare CDN for your WordPress on a hosting dashboard or Cloudflare account, but before that let’s look at the basics.

CloudFlare CDN: What is it?

CloudFlare is a distributed proxy server and a content delivery network (CDN) that caches some of the most well-known web content and delivers it to users across the world. This leads to a number of benefits like increased page load speed, clean traffic, increased security and reduced bandwidth usage.

Cloudflare CDN also provides other options such as DDos security, optimization of ads, analytics, and much more.

Prerequisite

Before you start the setup, make sure you have the following:

  • Access to the control panel of your domain name registrar.
  • Access to WordPress admin area

Let’s go through each step in detail.

Option 1: Installing CloudFlare on Your Hosting Dashboard

Some web hosting providers like Bluehost or HostGator offer an easier Cloudflare installation directly from cPanel. To find out if your hosting company provides direct installation of CloudFlare, log in to your cPanel homepage, and look for the CloudFlare logo on the advanced settings.

Next, register a Cloudflare account. To do so, follow the following steps.

  1. Go to cloudflare.com and in the sign-up box, type your email and a password then press the sign up button.
  2. On the registration page, enter all the required details.
  3. Then press the Create Account button. You don’t have to proceed to the next step to scan DNS records since it’s taken care of by the web host.
  4. Now, return to your web host cPanel. Enter a username and password you used before to log in to your Cloudflare account.
  5. After this step, you will be directed to the settings page on your Cloudflare account. Press the Activate link near the domain turn on Cloudflare.

Cloudflare free tier isn’t compatible with SSL certificate that is offered by web hosting companies. So if you decide to use SSL on your website, you will need to choose a paid Cloudflare plan. For those who don’t require the full-service security that comes with paid SSL certificates, they can opt for the free Cloudflare plan with SSL option.

Once Cloudflare is enabled, your web host will take care of the remaining details, and you will access Cloudflare settings from your cPanel dashboard.

Now you have successfully installed Cloudflare on your hosting cPanel dashboard.

Option 2: Adding CloudFlare to Your WordPress Site

Before you include CloudFlare on your website to improve speed, make sure you have a good hosting provider with no downtime. Then, if your web hosting company doesn’t offer an option to setup CloudFlare account through your cPanel, you can do it yourself using the steps below:

Step 1: Creating your CloudFlare Account

To setup CloudFlare, the first step is to signup for an account. Go to the official CloudFlare website and click the Sign Up button.

If you already have an account, you can skip this step.

Step 2: Adding your Website To CloudFlare

After you have signed up for an account, you will be required to add your website. To do so, just type or paste your domain name into the text box and click Scan DNS Records button.

At this point, it’s important to ensure that CloudFlare is enabled for your naked domain name and www domain. This allows CloudFlare to work on both of these domain versions. Once you’re done, click Continue button.

Step 4: Choosing a Plan

Cloudflare will now take you to their paid plans page. For this example, you can select the Free Website option then click Continue.

You may upgrade later to enjoy advanced features.

Step 5: Pointing Your Website to CloudFlare Nameservers

At this point, you will be presented with CloudFlare nameservers. You will be prompted to switch the nameservers to CloudFlare. To do so, go to the domain’s control panel and update the nameservers to the CloudFlare nameservers.

If you’re not sure how to go about changing your nameservers, it’s recommended that you consult your domain registrar’s support to guide you through the process.

Once more, click Continue.

You may need to wait for some hours for the nameserver to propagate worldwide.

Once the update is complete, you will receive a confirmation email message from CloudFlare. Your Cloudflare dashboard should look like this:

Step 6: Configuring CloudFlare on WordPress

For WordPress websites, Cloudflare offers unique features such as:

  • One-click optimization settings
  • Specific rulesets for the web application firewall
  • Automatic cache purge
  • Ability to adjust settings on Cloudflare without opening its the Cloudflare dashboard.

To active CloudFlare plugin on WordPress, go to the Plugins section and press the Installed Plugins button. Look for CloudFlare plugin and press the Settings button.

A screen will pop-up prompting you to enter your email address and API key:

To find the Cloudflare API key, login to the Cloudflare interface, and click on your email address. Choose My Profile, then scroll down until you see the API Key section. Press the View API Key.

Once you have the API Key, enter it into the API Key box plus your email in your

WordPress dashboard. Now, press the SAVE API Credentials button to save these changes.

When you transfer it to the CloudFlare settings interface, press the Apply button below the Apply Default Settings section.

Remember to enable Automatic Cache on WordPress by pressing the Apply button in the Automatic Cache section.

Conclusion

That’s it! By now you should know how to go about activating CloudFlare for your site and configuring CloudFlare plugin on WordPress. This will ensure your sites loads faster and secures it from DDoS attacks.

Check out these top 3 WordPress hosting services:

A2 Hosting
$2.99 /mo
Starting price
Visit A2 Hosting
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.8
  • Pricing
    4.0
Hostinger
$2.99 /mo
Starting price
Visit Hostinger
Rating based on expert review
  • User Friendly
    4.7
  • Support
    4.7
  • Features
    4.8
  • Reliability
    4.8
  • Pricing
    4.7
HostArmada
$2.49 /mo
Starting price
Visit HostArmada
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.5
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.0

How to Configure WordPress Page Caching

A savvy website owner understand how important it is to have a website with a qu
4 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How to Secure Your WordPress Website

Millions of websites get hacked every year and many people consider WordPres
5 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How To Create a WordPress Child Theme

Customizing your WordPress theme but want to be extremely safe? Don’t worry. W
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester

How to Fix File and Folder Permissions Errors in WordPress

It’s so frustrating when you receive an error while updating your website. File
4 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top