> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.serverfreak.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Install & Enable LsCache Plugin for MediaWiki


|| Note: This version of LiteSpeedCache requires MediaWiki 1.25 or later

1. Download the **LsCache plugin** from LiteSpeed's [Github](https://github.com/litespeedtech/lscache_mediawiki/archive/master.zip) repository.


2.  Insert the following line into _.htaccess_ file if it doesn't exist.
     <IfModule LiteSpeed>
     CacheLookup on
     </IfModule>


|| Note: To avoid error, make sure .htaccess file with the above line exists in your MediaWiki directory

3.  Move the **LiteSpeedCache** directory to **/extensions** in the MediaWiki directory.
You can do this by using a File Manager or Filezilla FTP (as shown below).


![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/0c200e0d-a56f-4124-befd-4903cea40d5a.png)


4. Edit **LocalSettings.php** in the MediaWiki root directory, and add the following near the end:

_wfLoadExtension( 'LiteSpeedCache' );_


![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/e9d4a9f1-a276-4198-907d-7cf7c1e654ab.png)

5. Log in to MediaWiki and from the administrator panel, navigate to **Special pages** > **Data and Tools** > **LiteSpeed Cache**'.

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/a9bb6bb4-8158-46d3-a800-fb89c6d37c70.png)

6. Click on **Edit** to edit the page to enable public cache:

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/c965a50a-3233-4e29-9453-d0716790d8f6.png)

7.  Set the following to be checked and save the page by pressing **Save Cache Setting**

**LiteSpeedCache Enabled** : Enabled
**Public Cache TTL (seconds)** : 864020
**Private Cache Enabled (for logged-in users)** : Enabled
**Private Cache TTL (seconds)** : 7200

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/8542bf1a-ab09-445d-bdf0-383fb43ba3a2.png)

8. Once you have saved the settings successfully, it will show you **"LiteSpeed Cache Settings Saved!" **

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/e0f702a0-3df0-4b06-b801-27db17519b54.png)

That's the end of this tutorial!




### Verify Cache Setup (To Determine Whether LsCache is Working Properly)

1. Visit the main page of your MediaWiki website. 

Using Google Chrome as example, press the shortcut button **CTRL+SHIFT+I**  to open up the developer tools tab or by using the manual way as shown below

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/f97fd74d-7a9e-4ccc-bdaf-9afcebff037b.png)


2. Click on the **Network** section on the developer tools tab. Remember to load your MediaWiki website URL by pressing the F5 button.


![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/28b24815-b65d-4cb9-96c4-78745f902b33.png)


3. Once loading is done, you should see the following information which indicates LsCache plugin is running successfully at the background.

**X-LiteSpeed-Cache: hit,private**


![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/4662f81d-74bf-4dec-8286-d2ae69f61d1f.png)