How to Add Cloudflare to WordPress

Written by WordPress Expert

March 14, 2023
How to Add Cloudflare to WordPress

Website speed is important and over 70% of consumers admit that while shopping online. Even if you use a cache plugin, you need to worry about how your website loads for customers that are located farther from the web server that hosts it. That’s where a CDN like Cloudflare comes into play. In this article you’ll learn a bit about Cloudflares, CDNs, why you might need it, as well as how to add Cloudflare to WordPress.

What is Cloudflare?


Cloudflare Homepage

Cloudflare is a company that provides a network of servers across the world that delivers a fast and safe version of your website to your visitor, wherever they may be located. With their security, especially at their free pricing tier, Cloudflare can help reduce bad bots from reaching your website. Cloudflare offers both free services, and paid services, depending on what you need.

Essentially, when you sign up with Cloudflare and add your website, they scan your website and save a copy of it. That saved copy if distributed to their proxy servers around the globe. This might seem confusing, as it may look like they become your web host instead of the one you paid for. That isn’t the case.

Cloudflare merely has a copy. If you change your WordPress site, whether it’s publishing a new page or post, or changing the entire theme, Cloudflare will continue to monitor and scan your site for an updated copy to deliver on their network.

What is a CDN?


A CDN is short for content delivery network. It is a globally distributed network of servers designed to give better website performance. For example, if your web host server is located in the US, but your website uses Cloudflare, and your customer is located in Australia, Cloudflare delivers a copy of your site on their network server that’s located closer to Australia. This allows your website to load a lot faster for them, even a couple seconds, than without a CDN.

Why would you need a CDN?


As a website owner, if your website isn’t secure or loading fast, you’re eventually going to see that you’re losing potential customers or you’re welcoming bad bots to try to hack your website. Your site should load within 0-4 seconds. Even if you optimize WordPress for site speed or add some security layers to your website, you can do better. A CDN adds a boost of speed because it’s faster for your customer to access the closet copy of your site. Additionally, a CDN provides an added blanket of security focused on catching and denying bad bots from reaching your website.

How to Add Cloudflare to WordPress in 3 Steps


To add Cloudflare to WordPress, you will need to register for an account. Registering is free.

Once you’ve signed up and verified your email address, you should be able to access your Cloudflare dashboard. Here are the steps on how to add Cloudflare to WordPress:

  1. Click Add Site to let Cloudflare scan your website.
  2. Check your DNS settings that Cloudflare found.
  3. Change your Nameservers (DNS).

Click Add Site to let Cloudflare scan your website

Click Add Site to let Cloudflare scan your website

Cloudflare essentially takes over as your DNS, but they need to know what your current nameservers are. Put your website in the field (example: yourdomain.com) and then click the Begin Scan button.

Check your DNS settings that Cloudflare found

Check your DNS settings that Cloudflare found

Once Cloudflare has found your current DNS settings, they will list all the basics. Cloudflare will basically tell you what areas will be served by their DNS and what won’t be served by them. Make sure these settings are right before you continue to the next step.

More than likely you’ll be prompted to pick a Cloudflare plan after this step. Don’t worry about it much, as you can decide to upgrade later on. Select the free plan before continuing to the next step.

Change your Nameservers (DNS)

Change your Nameservers

In this step you’ll be changing your nameservers to the one’s that Cloudflare provides. You will need to open another tab in your browser and log into where your domain registrar is. In some cases, your domain registrar may be the same as your hosting for WordPress.

Replace each nameserver with the one that Cloudflare displays, exactly as they list it. Once you have, click the button to continue. Please note that when you do this, it will take around a day for the nameservers to fully change and settle on Cloudflare’s DNS. However, your traffic shouldn’t go down. It should just happen without any downtime.

So yeah, that’s really all it takes to sign up and add Cloudflare to WordPress. However, if you want to not only manage your site from Cloudflare, but from your WordPress admin, there’s a way to do that in the next section of this article.

How to Manage Cloudflare in WordPress


Manage Cloudflare in WordPress

Cloudflare has a plugin to help you manage some of their settings from your WordPress admin area. This is purely optional, as you can manage all of your Cloudflare settings directly with the site, but this option allows you to do that while you’re already working on your website. Also, this plugin is completely free.

All you need to do is get your Cloudflare API credentials from your account. You will need to create an API key in Cloudflare by going to My Profile, and then API Tokens. From there you select the option to Create Token. Follow the steps until you are given an API key that you can copy and paste in your plugin’s settings.

Cloudflare wordpress plugin setup

Once you save your API key, the plugin will give you access to its settings.

Purge Cache

The most handy setting of this plugin is Purge Cache. If you’re changing the design or your content, but after saving the changes, you don’t see them, you can use the Purge Cache option in your Cloudflare plugin. Please note that it may take a few minutes for the cache in Cloudflare to be cleared.

Cloudflare plugin DNS settings

The Cloudflare plugin has some advanced DNS settings. Some may only be available with their pro plan. However, many of these are for added security. For example, their $20 per month Pro plan includes features like image optimization, and web application firewall.

In Summary


Cloudflare can be a super handy tool for any type of website, whether you want to rely on it’s CDN capabilities or for that added level of security they give. Try out this tutorial on how to add Cloudflare to WordPress, and see if Cloudflare helps boost your website’s speed. If it does, make sure to give this article a share.

At Verpex we provide numerous hosting plans for WordPress and managed hosting servers for WordPress that can help you launch a site for your business or brand that’s secure, fast, and optimized for success.

Frequently Asked Questions

Can I host multiple websites?

Yes. Some packages even give you unlimited domains. However, the more you host, the slower your speeds will be.

Does a website need hosting?

Yes. In order for a site to be accessed by outside users, it needs to have website hosting.

Can you migrate my existing website over?

Yes, and without issue. Regardless of how many websites you’re managing, we’ll bring all of them under the Verpex wing free of charge. Just send us the details of your websites when you’ve signed up to get started.

Can you migrate my existing website over?

Yes, and without issue. Regardless of how many websites you’re managing, we’ll bring all of them under the Verpex wing free of charge. Just send us the details of your websites when you’ve signed up to get started.

Discount

🚀 EXTRA 25% OFF ALL VERPEX MANAGED HOSTING PLANS FOR WORDPRESS

with the discount code

SERVERS-SALE

SAVE NOW
Jivo Live Chat