Before we start you need to know about what is WordPress LiteSpeed Cache!
LiteSpeed Cache is also known as LSCache for WordPress, are an inbuilt technology and ultra-performance Dynamic Content Acceleration(DCA) advanced service provided LiteSpeed Web Server.
To get the most performance from LiteSpeed Cache plugin you need to have a LightSpeed based web server or hosting server.
You must ensure you are using of these web servers to setup LiteSpeed Cache:
- LiteSpeed Enterprise
- Open Lite Speed
- LiteSpeed Web ADC
- QUIC Cloud CDN(Content Delivery Network)
What if I want to use LSCache without LiteSpeed Servers?
You can install and use LiteSpeed Cache WP Plugin with most of the popular web servers like Apache, Nginx, etc. But you cannot get the most important features of LiteSpeed Cache is Web and Browser Caching Features. By the way, you can use most of the optimization functionality on non-LiteSpeed Web Servers.
LiteSpeed compatible plugins:
- WordPress Multilingual Plugin(WPML)
- Contact Form 7(CF7)
- Yoast SEO
- WordFence Security
- Google XML SiteMap
- NextGen Gallary
- BB Press
- Elegant Themes Divi
- Avada Theme
- Aelia CurrencySwitcher
- FastVelocity Minify
- Better WP Minify
Let’s get started installation process of LiteSpeed Cache:
- Login to your WordPress admin panel Dashboard
- Scroll down to plugin section and select add new
- In the Plugin Search Box enter these text “litespeed cache”
- Install the WordPress plugin “LiteSpeed Cache” proudly served by LiteSpeed Technologies.
- Then activate it and you will redirect to all installed plugin sections.
- Find the LiteSpeed Cache Plugin and select Setting
Now you get cache-control setting with 8 Tab, These are
- TTL (Time to Live)
Lets set these things up
- Enable Cache -> ON
- Cache Logged-in Users -> OFF
- Cache Commentators -> ON
- Cache Rest API -> ON
- Cache Login Page -> OFF
- Cache Favicon.ico -> ON
- Cache PHP resource -> ON
- Cache Mobile -> OFF
Save these settings in Cache Tab.
2: TTL(Time to Live):
- Default Public Cache TTL -> 6,04,800 Seconds or 1 Week
- Default Private Cache TTL -> 1,800 Seconds or 30 Minute
- Default Front Page TTL -> 6,04,800 Seconds, Decrease it if you continuously make changes on the front page.
- Default Feed TTL -> 6,04,800 Seconds.(Recommended)
- Default Rest TTL -> 1 Week
- Default HTTP Status Code Page TTL -> No change
Save these settings.
When you purge a page, this page previous caches are removed and updated resources are reloaded from the server and cached with the updated resource.
So after changing anything don’t forget to purge the page to see the change you made.
- Purge all on Upgrade -> ON
- Auto Purge rules for Publish/Update -> Tick mark all things except All Pages, Yearly Archive and Daily Archive.
- Serve Stale -> OFF
- Let other things unchanged and click save.
- Do not cache Roles -> Tick mark for Administrator, Editor, and Author
Because they make changes and edits all the time. To see what they make the change they will need every time using the page purge thing If you tick mark these three things they will not need to purge cache all the time they make changes.
5: ESI (Edge Slide Includes).
- Enable ESI -> OFF
- Cache Admin Bar -> OFF
- Cache Comment Form -> ON
- Keep other things unchanged and click save.
Object Cache Setting
- Object Cache -> ON
- Method -> MemCached
- Host -> LocalHost
- Port -> 11211
- Default Object Lifetime -> 360 Second
- Username and Password (SASL is installed)
- Persistent Connection -> ON
- Cache WP Admin -> OFF
- Store Transient -> ON
7: Browser Cache Setting
- Browser Cache -> ON
- Browser Cache TTL -> 2592000 Seconds or Almost 4 Weeks
8: Advance Setting:
No need to change any advanced setting.
Now the Cache Settings are completely configured for optimum performance.
In the General setting section, you can enable Automatic Upgrade of LiteSpeed Cache Plugin, Or can just set it to manual upgrade mode where you need to upgrade this plugin manually.
LiteSpeed Cache Image Optimization Setting:
Goto the 2nd Tab named as Image Optimization Setting:
- Auto Request Cron -> ON
- Auto Pull Cron -> ON
- Optimize Original Images -> ON
- Remove Original Backup -> OFF
- Optimize LossLessly -> ON .
- Preserve EXIF/XMP data -> ON
- Create WebP version -> OFF
- Image WebP Replacement -> OFF
- WebP For Extra srcset -> OFF
- WordPress Image Quality Control -> 90%(For high-quality images)
Reads more to improve WordPress health status
LiteSpeed Cache Page Optimization:
- CSS Setting Tab
- CSS Minify -> ON
- CSS Combine -> OFF(Recommended by Developers)
- Unique CSS Files -> OFF
- CSS HTTP/2 Push -> OFF
- Load CSS Asynchronously -> OFF
- General Critical CSS -> ON
- Generate Critical CSS in Background -> ON
- Inline CSS Async Lib -> ON
- Font Display Optimization -> Default
- JS Settings
- JS Minify -> ON
- JS Combine -> ON
- JS HTTP/2 Push -> OFF
- Load JS Differed -> OFF
- Load Inline JS -> Default
- Exclude JQuary -> ON
- Optimization Settings
- CSS/JS Cache TTL ->6,04,800 Seconds or 1 week
- HTML Minify -> ON (May cause changes User Interface Rarely)
- Inline CSS Minify -> OFF
- Inline JS MInify -> OFF
- DNS Prefetch Control -> OFF
- Remove Comments -> OFF
- Remove Query Settings -> OFF
- Load Google Fonts Asynchronously -> OFF
- Remove Google Fonts -> OFF
- Remove WordPress Emoji -> OFF (Enable this to stop Emoji Functionality)
- Media Settings
- Lazy Load Image -> ON (Most Important and Recommended)
- Responsive Image Placeholder -> ON
- Responsive Placeholder Color -> Choose anything you like. This color will be shown instead of images when images are loading.
- LQIP Cloud Generator -> On (If this is on , the very low-quality preview of the image will be shown to users when the images are loading, I think it is the best use instead of color preview.
- LQIP Quality -> 4
- LQIP Minimum Dimensions -> 150*150 Pixels
- Generate LQIP in Background -> ON (Recommended)
- Lazy Load iFrames -> ON
- Inline Load Image Library -> ON
- Media Excludes -> No changes needed.
- Discussion Settings
- Gravatar Cache -> ON
- Gravatar Cache Cron ->ON
- Gravatar Cache TTL -> 6,04,800 Seconds or 1 Week
- Tuning Settings -> Default
Tap to Clean All button to clean your database unused files and trashed files. These will also clean your revisions. If you want to keep your revisions select an individual option.
Database Optimization Settings:
You can set your max revisions to keep for a post or pages.
Setting up Cloudflare with LiteSpeed Cache.
- Sign up in Cloudflare
- Complete the necessary steps
- Goto my profile
- Find My API Tokens
- Goto to the global API Key and click view
- You will require human verification and your password on Cloudflare to view global API Key
- Now copy your global API Key and past on WordPress dashboard Cloudflare AGlobal API key option on LiteSpeed settings. Put your email used for registering on Cloudflare
- Enter You root domain on Domain Box
- Click saves.
Now your LiteSpeed Cache and Cloudflare can work simultaneously.
Follow the Picture to understand Properly
Reads more to start a free wordpress blog