The Best Free WordPress Tutorials to Master WordPress

WordPress LiteSpeed ​​Cache Settings

1 626

When you want to optimize your WordPress website, LiteSpeed ​​Cache plugin is one of the best caching plugins. When you set up Litespeed Cache correctly, you can have an extremely fast website that results in faster loading web pages, lower bounce rate, better SEO results and better conversions.

LiteSpeed ​​Cache Setup

WordPress LiteSpeed ​​plugin helps improve WordPress site performance by taking advantage of the web server’s built-in page cache.

To install the LiteSpeed ​​Cache plugin, you can download the plugin by visiting the WordPress LiteSpeed ​​Cache plugin page, or you can easily complete the installation by searching the WordPress left panel > Plugins > Add new.

LiteSpeed ​​Cache Plugin Settings

WordPress performance can be greatly improved with the LiteSpeed ​​Cache plugin , especially if you have a high traffic website . The default settings of the LiteSpeed ​​plugin will be sufficient for most installations, but if you want to configure it manually, you can make the settings under the left panel > LiteSpeed Cache plugin.

- Advertisement -

Now start performing the following steps for the best performing LiteSpeed Cache settings.

General (General Settings)

To set LiteSpeed general settings, click on the WordPress left panel > LiteSpeed Cache > General.

Automatically Upgrade: Automatically updates when a new version of the LiteSpeed Cache plugin is available. But it would be safest to set it to off.

Domain Key: If you plan to use any of the features, you will need a domain key. You can define it in this section.

Notifications: Automatically show the latest news such as new releases, beta releases. You can leave it in the off position.

Cache Settings

In this section, you can make settings related to caching such as Cache, TTL, Purge, Object, Browser.

1- cache

Enable Cache: Enables cache settings. When you change it to disabled, all cached data is reset.

Cache Logged-in Users: Provides a private cache for users logged into your WordPress site. If you have special pages for your users, you can enable this field.

Cache Commenters: Uses private caching for commenting users. It should be in the open position.

Cache REST API: Cache requests made by WordPress REST API requests. It should be in the on position, but if any function is broken, turn it off.

Cache Login Page: Allows caching of the WordPress website login page. It should be on, disabling it may adversely affect performance.

Cache favicon.ico: Because the favicon is not part of the main content, caching this resource can improve server performance by avoiding unnecessary requests. It should be in the open position.

Cache PHP Resources: Some themes and plugins can add resources by PHP request. In this case, caching resources can improve server performance by avoiding unnecessary PHP requests. It should be left in the open position.

Cache Mobile: Displayed differently on mobile than on desktop; It should be left On for AMP sites or mobile site designs. Responsive sites should also be left off. E.g; If you have a different design for the mobile site, turn it On and it offers a custom caching. It is not needed as the same content will be presented on responsive sites.

List of Mobile User Agents: Used if the cache mobile section is open. If there are missing devices, you can add them to the list.

Private Cached URIs: For pages that need to be cached individually for each visitor (assuming they see individual pages). For example, you can think of it as user account pages. You can add 1 URL per line in the list. Sample; /user-account$

Force Cache URIs: Cache is enforced for pages added to the list.

Force Public Cache URIs: Cache is required for public pages added to the list.

Drop Query String: Prevents caching of query strings added to the list.

2- TTL

TTL is the part where the cached content is set for how long it will be valid. You can leave this section at the default settings.

Default Public Cache TTL: You can set the caching time of public pages in seconds. Recommended should be set to 604800 (1 week).

Default Private Cache TTL: You can set the caching time of your private pages. Recommended should be set to 1800 (30 minutes).

- Advertisement -

Default Front Page TTL: You can set the caching time of your home page. Recommended should be set to 604800 (1 week).

Default Feed TTL: You can specify the caching time, in seconds, of RSS feeds. By default it is 0. Recommended should be set to 604800 (1 week).

Default REST TTL: You can cache requests using web protocols and technologies in seconds. Recommended should be set to 604800 (1 week).

Default HTTP Status Code Page TTL: You can specify the caching time for pages encountered with HTTP status code. Add one per line. The default time should be set to 3600 (30 minutes).

3- Purge

Purge is the cache cleaning part of LiteSpeed Cache plugin. You can leave the Purge settings as default.

4- Excludes

You can disable the WordPress Litespeed Cache plugin settings from the excludes menu. You don’t need to use any of these. However, excluding users with the admin role from the cache will allow you to see errors on the page.

Do Not Cache URIs: Here you can define the pages that you do not want to be cached. Add one URL per line in the list. To add a direct exact match page, add a “$” sign at the end of the URL. To completely block a directory path, add a “^” sign at the beginning of the URL.

For instance; You can exclude the direct URL like blog/seo-how-to$ .

If you add it as ^blog/seo , you can exclude all URLs that come with the blog/seo URL path.

Do Not Cache Query Strings: You can exclude query strings that contain query string parameters. Add one per line.

Do Not Cache Categories: Categories on your WordPress site are cached by default. If you have categories that you don’t want cached, add them to the list.

Do Not Cache Tags: Add your tags that you do not want to cache to the list.

Do Not Cache Cookies: Cookies you add are excluded from the cache.

Do Not Cache User Agents: You can exclude caching of users you add.

Do Not Cache Roles: You can select the user roles you want to exclude from the cache. It can be marked for administrators.

5- ESI

Allows to take advantage of caching on (dynamic) pages that should not be cached. Content is cached separately from the actual page it is on.

If you want to use this partition, set Enabe ESI to ON. For detailed information on using ESI, see the official LSCache guide.

6- Object

Object caching is the process of caching from RAM on the server.

Object Cache: You can turn it ON if you have memcache or redis installed, or if you have a lot of dynamic content or database queries. But for most websites, it’s safest when it’s off.

7- Browser

- Advertisement -

This part is the same functionality as HTML expiration lines in your .htaccess or browser caching that some other plugins do.

Browser Cache: You must turn on the browser cache to cache static resources on your site. It provides significant performance in page transitions. You should definitely set it in the open position. Thus, you can increase your Google Pagespeed scores.

Browser Cache TTL: You can specify the duration of the resources to be cached by the browser. The recommended time is 31557600 seconds (1 year).

8- Advanced

It is the advanced settings section of the LiteSpeed Cache plugin.

Login Cookie: You can use this domain if more than one site is installed on the same domain.

Improve HTTP/HTTPS Compatibility: If you are using both HTTP and HTTPS in the same domain, setting it on will make it work more regularly. However, if you’re using a single protocol, it should be off.

Instant Click: Makes the page preload and ready when you hover over a link. Leave it in the off position as it will overload the server.

Image Optimization

You can do the free image compression service of the WordPress Litespeed Cache plugin under the Image Optimization menu.

1- Image Optimization Summary

You can see the summary of the image compression processes in this section.

2- Image Optimization Settings

You can change the visual optimization settings from this section. It’s best to leave it as default but still make sure it’s like below.

LiteSpeed Cache Image Optimization

Auto Request Cron: Must be On for automatic processing of all images added to your site.

Auto Pull Cron: Turn On to automatically pull optimized images to your site.

Optimize Original Images: Automatically backs up the optimized images. It must be set in the on position.

Remove Original Backups: Automatically deletes the backup of the optimized images. You can set it in the off position.

Optimized Losslessly: Compresses images without loss of image. You should definitely set it in the open position.

Preserve EXIF/XMP data: It ensures the protection of information such as description, location, copyright that you add to the visual properties. Setting it to on will also be beneficial for local SEO .

Create WebP Versions : Creates .webp version of images. In case of conflict with a different plug-in or if you have problems with some browsers, you can set WebP-related sections to off.

Image WebP Replacement : Replaces your images with the optimized .webp format. Your page loading speed will improve significantly. You will also get rid of the “Publish images in next-gen formats” warning in the Google Pagespeed test.

WebP Attribute To Replace: You can set which section of your site to replace images with .webp format.

WebP For Extra srcset: You can enable .webp image replacements for unmanaged images via the WordPress media library.

WordPress Image Quality Control: You can determine the compression ratio of your images. Ideal would be to set it to 82.

We also recommend you to review the article below for a more comprehensive image optimization .

Page Optimization

With page optimization, you can greatly increase your website speed. Problems you may experience with the Litespeed Cache plugin take place in this section. For this reason, read the explanations and take the necessary actions while making the settings.

1- CSS Settings

CSS Minify: This section provides compression by deleting the comments and line spaces in the title and description sections of your CSS file. You must set it to on.

CSS Combine: Combines all your CSS resources into one file. In this way, your total number of queries is reduced. Setting it to on will significantly improve your performance. However, if there are corruptions on your site, you can use the CSS Excludes field from the Tunning Settings section . You can review the relevant section of our article on the subject below.

Unique CSS File: When you set CSS Combine to on and enable this section, one combined CSS file will be obtained for each URI regardless of the maximum combined file size setting. (This section may not be available in the new version.)

CSS Combine External and Inline: When the CSS Combine feature is enabled, it will include the CSS source and inline CSS in the combined file. This option helps to minimize errors that may occur with CSS Combine. You can set it to on. (This section may not appear in current versions.)

CSS HTTP/2 Push: The CSS resource is sent before browsers request the CSS resource. For most sites it doesn’t make much of a difference. For this reason, it is your choice to use it.

Load CSS Asynchronously: When you activate this field, CSS and HTML will be loaded at the same time. When set to On, your Pagespeed and GTMetrix scores will increase. It may cause style defects during the first load.

Generate Critical CSS: This feature only works if the Load CSS Asynchronously feature is enabled. Generates critical style resources to prevent style artifacts on initial load.

Generate Critical CSS In Background: If you are using the Critical CSS property, it will make this property run in the background. It should be set to on.

Separate CCSS Cache Post Types: This property is valid if you are using the Critical CSS property. Here you can set which types of critical CSS files apply.

Separate CCSS Cache URIs: You can set the Critical CSS property on which pages it will work by entering the URL one by one.

Inline CSS Async Lib: Increases page load speed by inline CSS library. It must be set in the on position. You can turn it off in case of errors in the theme design.

Font Display Optimization: Provides optimization of your fonts. When you set it to swap, you get rid of the Google Pagespeed “make text stay visible during web font load” warning. When selected as Swap, the browser’s default font appears until the font is loaded.

2- JS Settings

JS Minify: When you set this section to on, it will make your JS source minified by removing JS comments and line spacing.

JS Combine: Reduce the number of requests by combining JS resources. It must be set in the on position. However, if there are corruptions on your site, you can use the JS Excludes field from the Tunning Settings section . You can review the relevant section of our article on the subject below.

JS Combine External and Inline: When enabled with JS Combine, it will include external JS and inline JS in the combined file. This option helps preserve JS execution priorities, which should minimize potential errors caused by JS Combine.

JS HTTP/2 Push: The JS resource is sent before browsers make a request to the JS resource. Set it to on.

Load JS Deferred: Loads Javascript files later, allowing visible content to load faster. It allows you to get higher scores in Google Pagespeed and GTmetrix tools, but there may be errors in the design during the first load. Setting it on will increase your performance significantly. If you experience distortions in the theme, turn it off.

Load Inline JS: Runs in-sale javascript codes after all objects (DOM) in the site are loaded. The safest is to use it in “Default” mode, but it is recommended to set it in “Deferred” mode.

Exclude JQuery: This section excludes the jQuery library. It must be set in the on position.

3- HTML Settings

DNS Prefetch Control: Automatically checks and prefetches all domains called from CSS and JS. If you have added resources to the list in the previous option (DNS Prefetch), there is no need here. However, if you don’t know which resources to add to the list, set this section to On.

Remove Query Strings: It will remove query strings from static resources. Google reCAPTCHA is automatically bypassed when you set it to On. If you don’t make a lot of changes in the site design and don’t use reCaptcha, you can set it to on.

Load Google Fonts Asynchronously: Enables loading Google font asynchronously.

Remove Google Fonts: If you don’t want to use external Google fonts, setting this option to on will disable Google Fonts.

Remove WordPress Emoji: Removes what you want emoji JS, which is not needed nowadays as modern browsers can run emojis natively. It should be set to on.

4- Media Settings

Lazy Load Images: Lazy load is a feature that allows images to be loaded only when they are on the visible part of the screen, and increases the page speed significantly by not loading them when they are in the invisible, lower parts of the screen. It should definitely be used. If you are using the lazy load feature with a different plugin, you can set it to off. Also, if your website is not WordPress, you can set the lazy load feature by reviewing the article below.

You can leave the other settings in the media settings menu as default.

5- Media Excludes

In this section, the visual classes you add to the list are not lazy loaded. You can specify the color of the visual backgrounds that occur during lazy load.

6- Localization

Gravatar Cache: A great feature for sites with a lot of reviews. Enables caching of Gravatar images when enabled. If your pages don’t have a lot of comments, it doesn’t need to be enabled.

Gravatar Cache Cron: If you have activated the Gravatar cache feature, this feature must be activated. It provides automatic caching of images.

Gravatar Cache TTL: You can set how long the Gravater cache caching will be valid. Recommended is 604800 (1 week). But you can also set it for longer time. In the above example, we set it to 31557600 (1 year).

7- Tuning Settings

It is one of the important parts of Litespeed cache settings. Tuning menu is the section where fine adjustments are made. It allows to fix design corruptions that may occur on your website due to caching settings.

Combined CSS Priority: This feature loads the combined CSS before the uncombined CSS, as opposed to the default settings. It is usually set in the off position.

CSS Excludes: CSS resources added to this list are not compressed or are not included in the resource merge process due to the CSS Combine feature. When you turn on the CSS Combine feature in the CSS settings section, you can prevent errors that may occur in the design here. In the chart above, the main style file of the theme is excluded from all processes.

Combined JS Priority: This feature loads the combined Javascript before the unmerged JS, as opposed to the default settings. It is usually set in the off position.

JS Excludes: Javascript resources added to this list are not compressed or combined due to the JS Combine feature. When you activate the JS Combine feature in the JS settings section, you can prevent the errors that may occur in the theme here. In the image above, you can see the JS resources listed, which malfunction when compressed.

Max Combined File Size: You can set the maximum combined file size. When you type higher dimensions, fewer merged resources will be created.

Critical CSS Rules: You can add your important CSS resources to the list for faster loading of visible content at the top of the browser.

JS Deferred Excludes: Loads the JS resource you added to the list without delay. However, it may cause the visible content to load later. It is recommended to leave the list blank unless you have an important JS file that needs to be loaded first.

URI Excludes: Site URLs you add to the list will be excluded from the caching feature. It’s a good idea to list pages with broken design or functionality caused by LSCache plugin optimizations.

Role Excludes: Excludes user groups selected from the list from caching.

Database Settings

This menu of Litespeed Cache contains database optimization and cleaning tools. While most of the features available here are sold with different plugins as a fee, they are offered completely free of charge in the LSCache plugin.

Crawler Settings

You can use Crawler browser settings with the default settings. The general settings should still look like the image below.

We have come to the end of our Litespeed cache settings article. CDN and other paid features will be added to our guide later. If you have any questions about Litespeed settings , you can ask us by commenting.

If you are looking for a paid plugin especially for WordPress caching plugin, WP Rocket is a great caching plugin that meets all your needs. If you are not using WordPress and want to take advantage of the caching feature, you can review the articles below.

WP Rocket Settings and Installation (2022 Comprehensive Guide)

W3 Total Cache Settings (Optimal Configuration)

WP Super Cache Settings (Optimal Configuration)

We have come to the end of our WordPress Litespeed Cache settings guide. If you have problems or questions about the plugin, you can let us know by commenting.

This LitesSeed Cache settings article was prepared using the images of version v4.5.0.1

- Advertisement -

You might also like
1 Comment
  1. GetSocialGuide says

    This is a fantastic post that contains a lot of useful information. I appreciate you writing on LiteSpeed Cache for WordPress since it’s really useful to us.

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More