Title: Activating LiteSpeed Cache on Multisite &#8211; error
Last modified: November 12, 2021

---

# Activating LiteSpeed Cache on Multisite – error

 *  Resolved [techbus](https://wordpress.org/support/users/techbus/)
 * (@techbus)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/activating-litespeed-cache-on-multisite-error/)
 * New WordPress website – Multisite activated. (Sub Folder – htaccess for WordPress
   3.0 through 3.4+: [https://wordpress.org/support/article/multisite-network-administration/#htaccess-and-mod-rewrite](https://wordpress.org/support/article/multisite-network-administration/#htaccess-and-mod-rewrite))
   (
   Activated and deactivated LiteSpeed Cache without any problems before updating
   WordPress to Multisite.)
 * Activating LiteSpeed Cache plugin shows up error: There has been a critical error
   on this website.
 * PHP Debugging shows (when on any page on website):
    ———————————–
 *     ```
       Fatal error: Uncaught Error: Undefined constant "LiteSpeed\COOKIEHASH" in /home/WEBSITEDOMAIN.com/public_html/wp-content/plugins/litespeed-cache/src/htaccess.cls.php:528 Stack trace: #0 /home/WEBSITEDOMAIN.com/public_html/wp-content/plugins/litespeed-cache/src/htaccess.cls.php(690): LiteSpeed\Htaccess->_generate_rules() #1 /home/WEBSITEDOMAIN.com/public_html/wp-content/plugins/litespeed-cache/src/activation.cls.php(305): LiteSpeed\Htaccess->update() #2 /home/WEBSITEDOMAIN.com/public_html/wp-content/plugins/litespeed-cache/src/conf.cls.php(497): LiteSpeed\Activation->update_files() #3 /home/WEBSITEDOMAIN.com/public_html/wp-content/plugins/litespeed-cache/src/conf.cls.php(142): LiteSpeed\Conf->update_confs() #4 /home/WEBSITEDOMAIN.com/public_html/wp-content/plugins/litespeed-cache/src/conf.cls.php(33): LiteSpeed\Conf->_conf_db_init() #5 /home/WEBSITEDOMAIN.com/public_html/wp-content/plugins/litespeed-cache/src/core.cls.php(44): LiteSpeed\Conf->init() #6 /home/WEBSITEDOMAIN.com/public_html/wp-content/plugins/litespeed-cache/src/root.cls.php(197): LiteSpeed\Core->__construct() #7 /home/WEBSITEDOMAIN.com/public_html/wp-content/plugins/litespeed-cache/litespeed-cache.php(178): LiteSpeed\Root::cls() #8 /home/WEBSITEDOMAIN.com/public_html/wp-content/plugins/litespeed-cache/litespeed-cache.php(181): run_litespeed_cache() #9 /home/WEBSITEDOMAIN.com/public_html/wp-settings.php(357): include_once('...') #10 /home/WEBSITEDOMAIN.com/public_html/wp-config.php(96): require_once('...') #11 /home/WEBSITEDOMAIN.com/public_html/wp-load.php(50): require_once('...') #12 /home/WEBSITEDOMAIN.com/public_html/wp-blog-header.php(13): require_once('...') #13 /home/WEBSITEDOMAIN.com/public_html/index.php(17): require('...') #14 {main} thrown in /home/WEBSITEDOMAIN.com/public_html/wp-content/plugins/litespeed-cache/src/htaccess.cls.php on line 528
   
       Notice: is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/WEBSITEDOMAIN.com/public_html/wp-includes/functions.php on line 5663
       Notice: is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/WEBSITEDOMAIN.com/public_html/wp-includes/functions.php on line 5663
       ```
   
 * ———————————–
 * File permissions for folders are 755 and files are 644.
 * It looks like htaccess has not been updated when activating LiteSpeed Cache. 
   Is the activation of the plugin meant to edit the htaccess file or does this 
   happen by an clicking on an option within LiteSpeed Cache settings?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [techbus](https://wordpress.org/support/users/techbus/)
 * (@techbus)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/activating-litespeed-cache-on-multisite-error/#post-15061645)
 * I fixed by renaming the LiteSpeed cache plugin folder and renaming back again.
   Then LiteSpeedCache plugin worked when I activated. It was able to write into
   the htaccess file the LiteSpeed Cache settings ok. Maybe a bug but easy fix for
   anyone with the same issues.
 *  Thread Starter [techbus](https://wordpress.org/support/users/techbus/)
 * (@techbus)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/activating-litespeed-cache-on-multisite-error/#post-15061936)
 * I made a mistake regarding the fix. I actually activated the plugin on the subsite.
   i.e. not Network wide. When I try to Network Activate the LiteSpeed Cache plugin
   it breaks the website as above.
 *  [splaquet](https://wordpress.org/support/users/splaquet/)
 * (@splaquet)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/activating-litespeed-cache-on-multisite-error/#post-15062182)
 * have you tried adding these lines into your wp-config file, specifying where 
   backend and frontend htaccess files live?
 * frontend:
    `defined("LITESPEED_CFG_HTACCESS") || define("LITESPEED_CFG_HTACCESS","
   your path on server");`
 * backend:
    `defined("LITESPEED_CFG_HTACCESS_BACKEND") || define("LITESPEED_CFG_HTACCESS_BACKEND","
   your path on server");`
 *  Thread Starter [techbus](https://wordpress.org/support/users/techbus/)
 * (@techbus)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/activating-litespeed-cache-on-multisite-error/#post-15062418)
 * Hi splaquet
 * Could you tell me where you are getting this code?
 * I have never seen anything like it.
 * Also, there is only one htaccess file – not sure what you mean by “backend” and“
   frontend”.
 *  [splaquet](https://wordpress.org/support/users/splaquet/)
 * (@splaquet)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/activating-litespeed-cache-on-multisite-error/#post-15062485)
 * after reading over your post(s) again, I might have misread. I see that you installed
   multisite w/ subfolder, BUT… is the MU install in the root /public_html or in
   a subfolder (eg: /public_html/blog).
 * that wp-config setting (I believe) is more appropriate for subfolder WP installs,
   when there’s an .htaccess file located in /public_html & /public_html/blog.
 * that setting is located at:
    Litespeed Cache > Toolbox > view .htaccess
 *  Thread Starter [techbus](https://wordpress.org/support/users/techbus/)
 * (@techbus)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/activating-litespeed-cache-on-multisite-error/#post-15062581)
 * It is in the root public_html directory.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/activating-litespeed-cache-on-multisite-error/#post-15065667)
 * Hi,
 * it is fixed already and will be included in new release
 * for the time being , you can follow this [https://github.com/litespeedtech/lscache_wp/commit/4e21423e8080cedca8f6d9e6491d615f98442fbc](https://github.com/litespeedtech/lscache_wp/commit/4e21423e8080cedca8f6d9e6491d615f98442fbc)
 * to edit that file manually
 * Best regards,

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Activating LiteSpeed Cache on Multisite – error’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/activating-litespeed-cache-on-multisite-error/#post-15065667)
 * Status: resolved