Last updated on

Introduction

LiteSpeed servers have been around for many years, and W3 Total Cache has been and remains fully compatible out of the box.

However, the same couldn’t be said for OpenLiteSpeed (the free version of LiteSpeed) for several reasons:

  • OLS does not support all Apache rules, some of which W3TC utilized for various features
  • OLS requires a restart in order to apply configuration changes, which W3TC can’t trigger directly for security reasons

We’re happy to announce that as of W3 Total Cache v3.3.1, all W3TC features are now fully compatible with both LiteSpeed Enterprise and OpenLiteSpeed!

This article will walk you through configuring W3 Total Cache with OpenLiteSpeed.

Prerequisites

Before following the steps below, you’ll first need to ensure you’re on an OpenLiteSpeed server and have WordPress installed. If you need some help getting that set up then check out the OpenLiteSpeed and WordPress installation guide.

Configuring OpenLiteSpeed with W3 Total Cache

Things you will need.

  • Root access to your OpenLiteSpeed Web Server
  • Administrative access to your WordPress installation

In order to utilize W3 Total Cache in your WordPress installation hosted on an OpenLiteSpeed Web Server simply follow these steps.

  1. Install and activate the W3 Total Cache plugin
  2. As the root user, modify the OpenLiteSpeed virtual host configuration file (usr/local/lsws/conf/vhosts/example.com/vhconf.conf or similar path) to add a line to include the litespeed.conf file generated by W3 Total Cache.
    include /home/someuser/public_html/litespeed.conf
  3. Configure the W3 Total Cache plugin as desired. This should update the copied/symlinked configuration file located in your WordPress installation root directory.
  4. Restart the OpenLiteSpeed server to apply the changes to the configuration file. This can be accomplished either by the OpenLiteSpeed web console or via command line.
    • Option 1 : Web Console – On the OpenLiteSpeed main navigation menu, select Services and look for OpenLiteSpeed. You will see a switch which you can click and select Restart.
    • Option 2 : Command Line –  systemctl restart lsws

That’s it! Once the OpenLiteSpeed Web Server successfully restarts, W3 Total Cache should function without issue. Be aware however that the above process will need to be applied each time changes are made to the W3 Total Cache configuration in order for certain features and/or settings to apply under OpenLiteSpeed.

W3 Total Cache

You haven't seen fast until you've tried PRO

   Full Site CDN + Additional Caching Options
   Advanced Caching Statistics, Purge Logs and More

Everything you need to scale your WordPress Website and improve your PageSpeed.

Leave a Reply

Your email address will not be published. Required fields are marked *

W3 Total Cache logo

We Can Help Optimize Your Website

Optimize your site’s performance with our one-time premium services or ongoing monthly VIP support. View services

Got a Minute?

Your feedback helps us improve. Complete our customer survey now.

Partners

Bunny CDN Logo