{"id":4921,"date":"2026-08-29T23:00:38","date_gmt":"2026-08-29T14:00:38","guid":{"rendered":"https:\/\/donguri3.net\/server-tech\/enable-cloudflare-with-litespeed-cache-2\/"},"modified":"2026-08-29T23:00:40","modified_gmt":"2026-08-29T14:00:40","slug":"enable-cloudflare-with-litespeed-cache","status":"publish","type":"post","link":"https:\/\/donguri3.net\/en\/server-tech\/wordpress-blog-seo\/enable-cloudflare-with-litespeed-cache\/","title":{"rendered":"How to Enable Cloudflare with the LiteSpeed Cache Plugin in WordPress"},"content":{"rendered":"<p>Using Cloudflare to improve WordPress performance is highly effective. Especially when combined with the LiteSpeed Cache plugin, you can maximize the benefits of both caching and CDN. This article outlines the steps to configure Cloudflare with the LiteSpeed Cache plugin.<\/p>\n<h2>Creating a Cloudflare Account<\/h2>\n<p>First, visit the <a href=\"https:\/\/www.cloudflare.com\/\">official Cloudflare website<\/a> and create an account. If you already have an account, you can skip this step. In this guide, we logged in using a Google Account.<\/p>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e3.png\"><img decoding=\"async\" class=\"aligncenter wp-image-435 size-full\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e3.png\" alt=\"Logging into Cloudflare\" width=\"588\" height=\"696\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e3.png 588w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e3-253x300.png 253w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><\/a><\/p>\n<h2>Obtaining the Global API Key<\/h2>\n<p>To integrate LiteSpeed Cache with Cloudflare, you need your Cloudflare Global API Key. Follow these steps to obtain it:<\/p>\n<ol start=\"1\">\n<li>Log in to Cloudflare.<\/li>\n<li>Go to &#8220;My Profile&#8221; &gt; &#8220;API Tokens&#8221;.<\/li>\n<li>View and copy your &#8220;Global API Key&#8221;.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34.png\"><img decoding=\"async\" class=\"aligncenter wp-image-444 size-large\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34-1024x151.png\" alt=\"Cloudflare API settings\" width=\"1024\" height=\"151\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34-1024x151.png 1024w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34-300x44.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34-768x113.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34-1536x227.png 1536w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34.png 1856w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h3><strong>Note When Logging in with a Google Account<\/strong><\/h3>\n<p>If you created your Cloudflare account using a Google account, you will need a password to obtain your Global API Key. However, accounts created via Google do not have a password set by default in Cloudflare. Therefore, you must reset your password using the following steps:<\/p>\n<ol start=\"1\">\n<li>Log out of Cloudflare.<\/li>\n<li>Click &#8220;Forgot your password?&#8221; on the login screen.<\/li>\n<li>Enter the email address associated with your Google account.<\/li>\n<li>Open the URL in the email you receive, and enter the reset code along with a new password.<\/li>\n<li>Once the new password is set, log back in to Cloudflare.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e31.png\"><img decoding=\"async\" class=\"aligncenter wp-image-436 size-full\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e31.png\" alt=\"Setting a password in Cloudflare\" width=\"499\" height=\"261\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e31.png 499w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e31-300x157.png 300w\" sizes=\"(max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<h2>Configuring Cloudflare in WordPress LiteSpeed Cache<\/h2>\n<p>Next, enable Cloudflare within the LiteSpeed Cache plugin.<\/p>\n<ol start=\"1\">\n<li>In the WordPress dashboard, go to &#8220;LiteSpeed Cache&#8221; &gt; &#8220;CDN&#8221;.<\/li>\n<li>Enter your Cloudflare Global API Key, login email address, and target domain.<\/li>\n<li><strong>Do not turn on Cloudflare API at this stage<\/strong> (it will be enabled in a later step).<\/li>\n<\/ol>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34.png\"><img decoding=\"async\" class=\"aligncenter wp-image-444 size-large\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34-1024x151.png\" alt=\"Cloudflare API settings\" width=\"1024\" height=\"151\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34-1024x151.png 1024w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34-300x44.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34-768x113.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34-1536x227.png 1536w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e34.png 1856w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h2>Registering Your Domain in Cloudflare<\/h2>\n<ol start=\"1\">\n<li>Click &#8220;Add Site&#8221; in the Cloudflare dashboard.<\/li>\n<li>Enter your domain name and run a &#8220;DNS Scan&#8221;.<\/li>\n<li>Verify that there are no issues with the DNS records and complete the registration.<\/li>\n<li>Update your nameservers to the ones specified by Cloudflare (e.g., <code>camilo.ns.cloudflare.com<\/code>, <code>clarissa.ns.cloudflare.com<\/code>).<\/li>\n<li>Wait for the nameserver changes to propagate (this can take up to 24 hours, though it often completes within a few minutes).<\/li>\n<\/ol>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e32.png\"><img decoding=\"async\" class=\"aligncenter wp-image-437 size-large\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e32-1024x228.png\" alt=\"Domain settings in Cloudflare\" width=\"1024\" height=\"228\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e32-1024x228.png 1024w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e32-300x67.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e32-768x171.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e32-1536x341.png 1536w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e32.png 1624w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h2>Cloudflare Optimization Settings<\/h2>\n<p>Under Cloudflare&#8217;s &#8220;Recommended Settings&#8221;, enable the free optional features that help improve speed.<\/p>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e35.png\"><img decoding=\"async\" class=\"alignleft wp-image-446 size-medium\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e35-219x300.png\" alt=\"Cloudflare settings\" width=\"219\" height=\"300\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e35-219x300.png 219w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e35-748x1024.png 748w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e35-768x1051.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e35.png 836w\" sizes=\"(max-width: 219px) 100vw, 219px\" \/><\/a><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e36.png\"><img decoding=\"async\" class=\"aligncenter wp-image-445 size-medium\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e36-270x300.png\" alt=\"Cloudflare settings\" width=\"270\" height=\"300\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e36-270x300.png 270w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e36-768x854.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e36.png 841w\" sizes=\"(max-width: 270px) 100vw, 270px\" \/><\/a><\/p>\n<h2>Enabling Cloudflare API in LiteSpeed Cache<\/h2>\n<p>Finally, turn on &#8220;Enable Cloudflare API&#8221; in the LiteSpeed Cache CDN settings screen to complete the configuration.<\/p>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e37.png\"><img decoding=\"async\" class=\"aligncenter wp-image-447 size-large\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e37-1024x113.png\" alt=\"Cloudflare API settings\" width=\"1024\" height=\"113\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e37-1024x113.png 1024w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e37-300x33.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e37-768x85.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e37-1536x170.png 1536w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e37-2048x226.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h2>Verification Method<\/h2>\n<p>After setting up Cloudflare, it is important to actually test your site&#8217;s performance. You can check the effects using the following methods:<\/p>\n<p><strong>Page Speed Measurement<\/strong><\/p>\n<ul>\n<li>Check your site loading speed using Google PageSpeed Insights or GTmetrix. Once Cloudflare&#8217;s CDN is enabled, your loading speed should generally improve.<\/li>\n<li>As a beta feature, you can also check your site loading speed under Cloudflare &gt; Speed &gt; Observatory.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e38.png\"><img decoding=\"async\" class=\"aligncenter wp-image-448 size-large\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e38-1024x497.png\" alt=\"Cloudflare Speed Test\" width=\"1024\" height=\"497\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e38-1024x497.png 1024w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e38-300x146.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e38-768x373.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e38-530x257.png 530w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e38-565x274.png 565w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e38-710x345.png 710w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e38-725x352.png 725w, https:\/\/donguri3.net\/wp-content\/uploads\/2025\/02\/\u30ad\u30e3\u30d7\u30c1\u30e38.png 1054w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h2>Afterword<\/h2>\n<p>Integrating Cloudflare and LiteSpeed Cache is a powerful way to significantly boost website performance. It is particularly effective for high-traffic sites or for users sensitive to content loading speeds. By following the setup steps carefully, you should be able to experience the benefits quickly and effortlessly. Be sure to use the steps introduced here to implement Cloudflare on your site.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using Cloudflare to improve WordPress performance is highly effective. Especially when combined with the LiteS [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":448,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/donguri3.net\/?p=434","footnotes":""},"categories":[1166],"tags":[125,119,118,123,15,117,61,10,130,128],"class_list":["post-4921","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-blog-seo","tag-api","tag-cdn","tag-cloudflare","tag-dns","tag-litespeed","tag-litespeed-cache","tag-wordpress","tag-server","tag-130","tag-128","en-US"],"_links":{"self":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4921","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/comments?post=4921"}],"version-history":[{"count":1,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4921\/revisions"}],"predecessor-version":[{"id":4924,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4921\/revisions\/4924"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media\/448"}],"wp:attachment":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media?parent=4921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/categories?post=4921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/tags?post=4921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}