Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:cache:lscwp:installation [2017/10/08 14:20]
Hai Zheng
litespeed_wiki:cache:lscwp:installation [2020/11/14 15:39] (current)
Lisa Clarke Redirect to new Documentation Site
Line 1: Line 1:
-====== Installing & Enabling The LSCache Plugin For WordPress ====== +~~REDIRECT>​https://docs.litespeedtech.com/lscache/​lscwp/​installation/​~~
- +
- +
-===== Pre-Installation Requirements ===== +
- +
-  * LiteSpeed Web Server Enterprise Edition 5.0.10+. +
-  * LSCache Module. (Included with a 2-CPU or higher license. Can be purchased as an add-on for VPS, Ultra VPS, and 1-CPU licenses.) +
- +
-===== Installation ===== +
- +
-  - Configure server and/or virtual host level cache root and cache policy by selecting your setup in the Web Server Configuration section of the **[[litespeed_wiki:​cache:​common_installation#​web_server_configuration|LiteSpeed Web Cache Common Installation Guide]]**. +
-  - *Disable any other page caches as these will interfere with LSCWP. +
-  - [[https://wordpress.org/​plugins/​litespeed-cache/​|Download the LSCWP plugin]] from our WordPress Plugin Directory page. +
-  - Log in to your WordPress Dashboard, navigate to "​Plugins",​ and click on "Add New" -> "​Upload Plugin"​. +
-  - Select the LSCWP zip file and click "​Install Now"​. +
-  - Enable the plugin by navigating to Plugins >> LiteSpeed Cache >> Settings and checking the box for **Enable LiteSpeed Cache**. +
- +
-**Note:** If you are using any of our other LiteSpeed Cache plugins, please see **[[litespeed_wiki:​cache:​common:​logged-in-cookie-conflicts|Handling Logged-in Cookie Conflicts]]**. +
- +
-* Please see [[litespeed_wiki:​cache:​lscwp:​customizations:​multi-cache-plugins|this wiki article]] if the other cache plugin is intended for uses other than full page caching. +
-===== Testing ===== +
- +
-You can check if a page is being served from LSCWP by:  +
-    - Make sure you are not logged-in especially admin log in any tab for your browser. Navigating to your site from a non-logged-in browser and using your browser'​s developer tools to check the response header for the first file.  +
-    - Right click on the page and select some form of “Inspect”,​ then click on the “Network” tab in the inspector. +
-    - Refresh the page. +
-    - Click the first resource (this should be an HTML file and the inspector should change similarly to the image below). For example, if your page is ''<​nowiki>​http://​testsubdo.com</nowiki>'',​ your first resource should either be something like ''​testsubdo.com''​ or ''​/''​. +
-{{:​litespeed_wiki:​cache:​lscwp:​wpcachetest.png?​direct&​900|}} +
- +
-  - In a different, logged-in browser, navigate to the cache manager and purge your cache.  +
-  - Reload the page in the non-logged-in browser and select the same resource again. If you see "​X-LiteSpeed-Cache:​ miss", "​X-LiteSpeed-Cache-Control:​public,​max-age=1800",​ and "​X-LiteSpeed-Tag:​F,​B.1"​ (as an example), this will store the page in the cache.  +
-  - If you reload page a second time and see “X-LiteSpeed-Cache:​ hit” in the response header for the HTML file, then the page is being served by the cache and LSCWP is configured correctly. +
- +
-Currently, this plugin only provides caching for non-logged-in users and further development is in progress. +
- +
-**Note:** If your first refresh after purging returns “X-LiteSpeed-Cache:​ hit" in the response header, this may be because someone visited the page after you purged but before you refreshed it yourself. +
-===== Turning On the WordPress Debug Log ===== +
- +
-To enable the WordPress debug log, modify "​wp-config.php"​ under WordPress'​ root directory as follows: +
- +
-  - Set "​WP_DEBUG"​ to true. \\  \\ <​code>​define('​WP_DEBUG',​true);<​/code> +
-  - Add the following: \\ \\ <​code>​define('​WP_DEBUG_LOG',​true);</​code>​ +
- +
-a "​debug.log"​ file should now be generated under "​wp-content"​ which will log information whenever WordPress hits the backend.  +
- +
-You can monitor this log during debugging using the following command: +
-  tail -f wp-content/​debug.log +
-   +
-   +
-===== Table Creation ===== +
- +
-If your WordPress Database account doesn'​t have access to create tables, please run these SQL queries manually after installation+
- +
-Note: please change wp_ in wp_litespeed_optimizer to your wordpress tables prefix. +
- +
-<code sql> +
-CREATE TABLE IF NOT EXISTS wp_litespeed_optimizer ( +
-id int(11) NOT NULL AUTO_INCREMENT,​ +
-hash_name varchar(60) NOT NULL COMMENT “hash.filetype”,​ +
-src text NOT NULL COMMENT “full url array set”, +
-dateline int(11) NOT NULL, +
-refer varchar(255) NOT NULL COMMENT “The container page url”, +
-PRIMARY KEY (id), +
-UNIQUE KEY hash_name (hash_name),​ +
-KEY dateline (dateline) +
-);</code>+
  • Admin
  • Last modified: 2017/10/08 14:20
  • by Hai Zheng