No ‘x-litespeed-cache’ header | WordPress.org

[ad_1]

Would you provide us with a link to your page?

Ask your hosting provider if LiteSpeed cache is enabled.

Also, you have some custom rewrite modifications in your .htacces that you have to remove.

There is a litespeed cache option on my hosting’s panel. It is enabled.

you mean these line?
RewriteCond %{HTTP_ACCEPT} “image/webp” RewriteCond %{REQUEST_FILENAME}.webp -f RewriteRule ^(.*).(jpg|jpeg|png|gif) $1.$2.webp [T=image/webp,L]

This panel says nothing. Create a blank PHP file, copy the code from below in this file, transfer it to your server where WordPress is installed and request this page.

<?php
phpinfo();

If requested search for $_SERVER['X-LSCACHE']. The value must be at least on

Remove the file.

you mean these line?
RewriteCond %{HTTP_ACCEPT} “image/webp” RewriteCond %{REQUEST_FILENAME}.webp -f RewriteRule ^(.*).(jpg|jpeg|png|gif) $1.$2.webp [T=image/webp,L]

No, but this code is also custom.

Check .htaccess for any cache-control entry

I found a total of 6 ‘cache-control’, 4 of which seem to be related to images. The remaining two, I don’t know what they mean, I don’t dare to modify these codes casually:

#LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block!#
RewriteEngine on
CacheLookup on
RewriteRule .* – [E=Cache-Control:no-autoflush]RewriteRule .litespeed_conf.dat – [F,L]

#marker CACHE RESOURCE start#

RewriteRule wp-content/./[^/](responsive|css|js|dynamic|loader|fonts).php – [E=cache-control:max-age=3600]

#marker CACHE RESOURCE end#

Apart from the lines I added in my last reply, I haven’t edited anywhere else. I think these should be entries that originally existed.

As for whether the litespeed cache is enabled, I need some time to learn the operation. After completion, I will reply.

Apart from the lines I added in my last reply, I haven’t edited anywhere else. I think these should be entries that originally existed.

All posted code is default code set by the cache plugin, but the response header for cache control is not default. Do you have any plugin installed that can cause it?

As for whether the litespeed cache is enabled, I need some time to learn the operation. After completion, I will reply.

Cache function enabled? Try the the test code i have posted. It’s simple and fast to get a result.

I check the phpinfo. The value of $_SERVER[‘X-LSCACHE’] is on,crawler,esi,combine

I think it is good.

I have installed another plugin called Super Page Cache for Cloudflare. But in order to troubleshoot, I have completely restored the files and database to the state before installing this plugin, so I don’t think it’s the reason. I haven’t installed any other caching plugins. I don’t want to disable all plugins to troubleshoot, so I decide to create a subdomain, install a new WordPress and install Litespeed cache only to test if this will work.

  • This reply was modified 57 minutes ago by gcnj123.

I switched the nameserver from Cloudflare back to my hosting provider, and now the ‘x-litespeed-cache’ header has appeared and is showing as a hit. Next, I plan to give up Cloudflare and use quic.cloud instead. Now my concern is, if I switch the nameserver to quic.cloud, will it also cause the header disapear?

will it also cause the header disapear?

No. quic.cloud is especially made for WordPress and the LiteSpeed cache plugin and nothing else.

Thank you for your help. The issue solved.

Please mark it as solved.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer