Bobcares

LiteSpeed Cache Cloudflare | Setting up Tutorial

by | Jul 10, 2022

LiteSpeed Cache Cloudflare, combining them correctly gives us the best result when it comes to website speed. Let’s see more about LiteSpeed Cache with Cloudflare.

All inquiries, big or small, are answered by Bobcares as part of our Server Management service.

Let’s take a closer look at LiteSpeed Cache Cloudflare.

LiteSpeed Cache Cloudflare

LiteSpeed Cache: LiteSpeed Cache is a unique plugin for caching and speeding up a websites. Numerous plugins provide essentially the same features as LiteSpeed Cache, but it has a few outstanding features that set it apart from the competition.

Cloudflare: Cloudflare is a DNS and CDN service provider whose mission is to make everything we connect to the Internet secure, private, fast, and dependable.

litespeed cache cloudflare

Why Use LiteSpeed Cache Cloudflare Configuration?

The LiteSpeed Cache Cloudflare configuration takes advantage of Cloudflare’s extremely fast CDN speed as well as LiteSpeed Cache’s amazing optimization functionality. We get the best CDN solution by combining these two services. By combining these two services, we achieve the best CDN solution.

Setting up LiteSpeed Cache Cloudflare

Setting up LiteSpeed Cache with Cloudflare is fairly simple. Static file caching is automatically done. So here we set up an HTML file cache so that we can use the Cloudflare CDN to serve both static and dynamic files. Now our Support team will walk us through the process step by step. The main steps are:

  • Configure Cloudflare DNS
  • Setup of LiteSpeed Cache and Cloudflare
  • Employ the Cloudflare plugin

Now let’s see each step in detail.

Configure Cloudflare DNS
  1. We must use Cloudflare’s DNS in order to configure its CDN. Therefore, let’s begin by setting that up. Firstly, go to dash.cloudflare.com and log in.
  2. Now we are currently in the Cloudflare dashboard. Click the + Add site button from here.
  3. Enter the site in the format required on the following page. Then select Add site button.
  4. We can select the Cloudflare plan on the following page. We can also choose a free plan and then press the continue button.
  5. Now we can see the existing DNS records for that domain name. We can modify any of the records from the page. Make sure the domain has an A record pointing to the IP address of the web server from this page.
  6. Same as with the case of a subdomain. These records help to access the site. If there is no record, we can include it using Add button.
  7. Also, make sure the cloud icon for the domain name is orange. This is necessary to use CDN with the site. Then click the continue button.
  8. The two nameserver records for the Cloudflare account are displayed on the following page after the current nameserver records. Replace those current records with the Cloudflare records.
  9. We now need to visit the website of the domain registrar and modify the nameserver records of the domain from there.
  10. Now go back to Cloudflare’s page and click on the Done, check nameservers button.
  11. On the following Quick Start Guide page, click on Finish later so that we can change all the settings later.
  12. As it may take a while for Cloudflare to see the updated nameserver records, we will see the complete your nameserver setup page. We can select “Re-check now” to add the domain to Cloudflare’s waiting list.
  13. The nameserver records are generally verified within minutes even if it advise us to return in a few hours. After verification, we will see Great news! Cloudflare is now protecting your site on the following page.
Setup of LiteSpeed Cache and Cloudflare
  1. Go to the website’s dashboard for which we just set up Cloudflare DNS now. Now install and activate the LiteSpeed cache plugin.
  2. Now navigate to LiteSpeed Cache > CDN > CDN Settings from the website dashboard. The Cloudflare API section can be found by scrolling down.
  3. On the following page, provide the email address used in the Cloudflare account in the Email Address field.
  4. For the Domain field, provide the domain name of the website we are currently on.
  5. Then for the Global API Key field, we need to provide the Global API Key we take from the Cloudflare account.
  6. After that, activate the button next to the Cloudflare API selection. Then click the page’s Save Changes button.
  7. We can access the associated Cloudflare Domain name, Zone, Development Mode options, and Purge Everything button for the Cloudflare cache by going to the Manage tab from this page after saving the Cloudflare information.
Deploy the Cloudflare plugin

A good way to use dynamic HTML caching with Cloudflare CDN is by using the official Cloudflare plugin. When we update them from the website, it will automatically modify content from the Cloudflare CDN. So, that’s a good place to start when setting up a caching system. Let’s look at how we can set it up with a WordPress site in mind.

  1. On the WordPress website, first, install and activate the Cloudflare plugin.
  2. In the WordPress dashboard, go to Settings > Cloudflare. To link the Cloudflare account with this Cloudflare plugin, click the sign in link there.
  3. Now provide the Cloudfare API Credentials. In the Email field, enter the email ID used to create the Cloudflare account. In the Global API Key, use the Global API Key from the Cloudflare account.
  4. Then press the Save API Credentials button.
  5. On the following page, we will see the Home tab of the Cloudflare plugin. In the Apply Recommended Cloudflare Settings for WordPress section, click on the Apply button. This will sync the domain’s setting inside the Cloudflare account.
  6. Finally, the Automatic Platform Optimization section will enable Cloudflare APO on the site.

After setting up the Cloudflare plugin, there is only one more step before we can begin using Cloudflare for HTML caching.

  1. Visit the Page Rules tab on the Cloudflare dashboard. Now click the Create Page Rule button.
  2. Now, we must type the domain name followed by /* in the first input field on the following page.
  3. In the next field, select Cache Level. Finally, in the last field, select Cache Everything. Now click Save and Deploy.

The page rule will instruct Cloudflare to cache the HTML files. Now we have a pretty good HTML caching system in place.

[Looking for a response to a different query? We’re only a key stroke away.]

Conclusion

LiteSpeed Cache Cloudflare setup gives the best optimization results for the websites. Here, our Expert team has provided a detailed description of setting up LiteSpeed Cache with Cloudflare using the Cloudflare plugin.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

4 Comments

  1. Victor

    Thanks for a really good step by step guide! Just one issue: When activating the Cloudflare plugin, Litespeed Cache displays this warning: “Please consider disabling the following detected plugins, as they may conflict with LiteSpeed Cache:
    Cloudflare”

    Should I ignore this warning and use it anyway?

    Reply
    • Hiba Razak

      It may causes the conflict specially in case you have enabled the CF page cache,
      However, The warning says the potential issue , not stating that won’t work with it.

      Reply
  2. Kunal Otari

    Do we use quic.cloud cdn with cloudflare cdn together in lite speed cache plugin.

    Reply
    • Hiba Razak

      Yes, it is possible to use QUIC.cloud CDN (Content Delivery Network) in conjunction with Cloudflare CDN when using the LiteSpeed Cache plugin.

      Reply

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.