There are two ways to use LSCWP:
If you are not currently running a LiteSpeed Web Server with LSCache enabled, but you would like to use the caching features of the WordPress plugin, please contact your hosting provider. Ask them to switch you to LiteSpeed Web Server!
Advanced Viewto see all the tabs.
You may also install the plugin directly from the Plugins > Add New screen. Replace steps 3-5 above with:
LiteSpeed Cachein the search box. Our plugin should be the first search result to come up.
* Please see this wiki article for assistance using multiple optimization plugins at once.
You can verify a page is being served from LSCWP through the following steps:
X-LiteSpeed-Cache: miss X-LiteSpeed-Cache-Control:public,max-age=1800 X-LiteSpeed-Tag:B1_F,B1_
(for example), this means the page had not yet been cached, but that LiteSpeed has now stored it for future use.
X-LiteSpeed-Cache: hitin the response header. This means the page is being served by the cache and LSCWP is configured correctly.
Note: If your first refresh after purging returns
X-LiteSpeed-Cache: hit in the response header, this may be because someone else visited the page after you purged but before you refreshed it yourself. Try again from step 4.
Here are a few other things that may may be useful for your installation.
To enable the WordPress debug log, modify
wp-config.php under WordPress' root directory as follows:
debug.log file will be generated under the
wp-content directory, and 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
If you are using any of our other LiteSpeed Cache plugins for other web apps (like Magento, PrestaShop, XenForo, etc), or you are running multiple instances of WordPress, please see this article for some important information about avoiding conflicts between the different apps' caches.
If WordPress doesn't have access to create tables in your database, please run these SQL queries manually after installation:
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) );
CREATE TABLE IF NOT EXISTS `wp_litespeed_img_optm` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `post_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', `optm_status` VARCHAR(64) NOT NULL DEFAULT '', `src` VARCHAR(1000) NOT NULL DEFAULT '', `srcpath_md5` VARCHAR(128) NOT NULL DEFAULT '', `src_md5` VARCHAR(128) NOT NULL DEFAULT '', `server` VARCHAR(255) NOT NULL DEFAULT '', `root_id` INT(11) NOT NULL DEFAULT '0', `src_filesize` INT(11) NOT NULL DEFAULT '0', `target_filesize` INT(11) NOT NULL DEFAULT '0', `target_saved` INT(11) NOT NULL DEFAULT '0', `webp_filesize` INT(11) NOT NULL DEFAULT '0', `webp_saved` INT(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `post_id_2` (`post_id`,`srcpath_md5`), KEY `post_id` (`post_id`), KEY `optm_status` (`optm_status`), KEY `root_id` (`root_id`), KEY `src_md5` (`src_md5`), KEY `srcpath_md5` (`srcpath_md5`) );
Note: If your site uses a table prefix other than
wp_, please replace the
wp_litespeed_optimizer with your site's prefix.