Bobcares

For every $500 you spend, we will provide you with a $500 credit on your account*

BLACK FRIDAY SPECIAL

*Get up to $4000, Offer valid till November 30th, 2024

For every $500 you spend, we will provide you with a $500 credit on your account*

BLACK FRIDAY SPECIAL

*Get up to $4000, Offer valid till November 30th, 2024

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.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF