This is an old revision of the document!


The LiteSpeedCache plugin is a MediaWiki extension for MediaWiki sites running on a LiteSpeed webserver. Enable its LSCache feature to speed up page loading, reduce response time, and tremendously reduce server load for MediaWiki sites.

See https://www.litespeedtech.com/products/cache-plugins for more information.

MediaWiki is a free software open source wiki package written in PHP, originally for use on Wikipedia (the free encyclopedia). It is a feature-rich wiki implementation, that uses PHP to process and display data stored in its MySQL database. It is fairly popular wiki application on the web.

This version of LiteSpeedCache requires MediaWiki 1.25 or later and LiteSpeed LSWS Server 5.2.3 or later.

wget https://github.com/litespeedtech/lscache_mediawiki/archive/master.zip

Unzip the downloaded file with:

unzip master.zip

1. Create .htaccess if you dont have and put:

<IfModule LiteSpeed>
CacheLookup on
</IfModule>

2. Move the LiteSpeedCache directory to “/extensions” MediaWiki directory

3. Edit LocalSettings.php and add near the end (this file is in the root directory of MediaWiki):

wfLoadExtension( 'LiteSpeedCache' );

From the MediaWiki administrator panel navigate to:

Special pages → LiteSpeed Cache

Edit that page to enable public cache:

LiteSpeed public Cache Enabled - check this and Save the page

If a resource is served from LSWS cache, the server response header contains 'X-LiteSpeed-Cache: Hit'.

Load the URL https://domain.com/wiki/index.php/Main_Page

GET /wiki/index.php/Main_Page HTTP/1.1
Accept	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding	gzip, deflate, br
Accept-Language	en-US,en;q=0.5
cache-control	public, max-age=2592000
server	LiteSpeed
vary	Accept-Encoding, Cookie
x-litespeed-cache	hit
  • Admin
  • Last modified: 2017/12/27 15:10
  • by Tihomir