LiteSpeed Cache

Error with LiteSpeed Cache

You may have this kind of error with LiteSpeed Cache :

PHP Warning: in_array() expects parameter 2 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 584
PHP Warning: array_merge(): Expected parameter 1 to be an array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 598
PHP Warning: array_unique() expects parameter 1 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 599
PHP Warning: in_array() expects parameter 2 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 584
PHP Warning: in_array() expects parameter 2 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 609
PHP Warning: array_merge(): Expected parameter 1 to be an array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 573
PHP Warning: array_unique() expects parameter 1 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 574
PHP Warning: array_merge(): Expected parameter 1 to be an array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 598
PHP Warning: array_unique() expects parameter 1 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 599
PHP Warning: array_merge(): Expected parameter 1 to be an array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 573
PHP Warning: array_unique() expects parameter 1 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 574
PHP Warning: array_merge(): Expected parameter 1 to be an array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 598
PHP Warning: array_unique() expects parameter 1 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 599
PHP Warning: in_array() expects parameter 2 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 584
PHP Warning: in_array() expects parameter 2 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 609
PHP Warning: in_array() expects parameter 2 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 584
PHP Warning: in_array() expects parameter 2 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 609
PHP Warning: in_array() expects parameter 2 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 584
PHP Warning: in_array() expects parameter 2 to be array, null given in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 609
Connection refused

Or :

 Detected WordPress version as . Version 4.0 ‘ . ‘required at minimum.
 – [LOG][3] Install is flagged

Or :

Fatal error: Uncaught TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given in /wp-content/plugins/litespeed-cache/src/optimize.cls.php:223 Stack trace: #0 /wp-content/plugins/litespeed-cache/src/optimize.cls.php(223): strpos() #1 /wp-content/plugins/litespeed-cache/src/optimize.cls.php(764): LiteSpeed\Optimize->remove_query_strings() #2 /wp-content/plugins/litespeed-cache/src/optimize.cls.php(400): LiteSpeed\Optimize->_build_hash_url() #3 /wp-content/plugins/litespeed-cache/src/optimize.cls.php(300): LiteSpeed\Optimize->_optimize() #4 /wp-content/plugins/litespeed-cache/src/core.cls.php(395): LiteSpeed\Optimize::finalize() #5 [internal function]: LiteSpeed\Core->send_headers_force() #6 /wp-includes/functions.php(4757): ob_end_flush() #7 /wp-includes/class-wp-hook.php(292): wp_ob_end_flush_all() #8 /wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters() #9 /wp-includes/plugin.php(484): WP_Hook->do_action() #10 /wp-includes/load.php(1072): do_action() #11 [internal function]: shutdown_action_hook() #12 {main} thrown in /wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 223

Or :

PHP Warning:
/wp-content/litespeed/js/9e34ad64932c4eea8fff28d1130ef552.js): No such file or directory in public_html/wp-content/plugins/litespeed-cache/src/optimizer.cls.php on line 117

Or :

Fatal error: Uncaught RedisException: OOM command not allowed when used memory > ‘maxmemory’. in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php:488 Stack trace: #0 /wp-content/plugins/litespeed-cache/src/object-cache.cls.php(488): Redis->setex(‘boptions.al…’, ‘360’, ‘a:1:{s:4:”data”…’) #1 /wp-content/plugins/litespeed-cache/src/object.lib.php(323): LiteSpeed\Object_Cache->set(‘boptions.al…’, ‘a:1:{s:4:”data”…’, 0) #2 /wp-content/plugins/litespeed-cache/src/object.lib.php(52): WP_Object_Cache->set(‘alloptions’, Array, ‘options’, 0) #3 /wp-includes/option.php(405): wp_cache_set(‘alloptions’, Array, ‘options’) #4 /wp-content/plugins/lit in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 488

Or :

An error of type E_ERROR was caused in line 583 of the file /wp-content/plugins/litespeed-cache/src/root.cls.php. Error message: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /wp-content/plugins/litespeed-cache/src/root.cls.php:583
Stack trace:
#0 /wp-content/plugins/litespeed-cache/src/root.cls.php(583): array_merge()
#1 /wp-content/plugins/litespeed-cache/tpl/banner/new_version.php(24): LiteSpeed\Root::save_summary()
#2 /wp-content/plugins/litespeed-cache/src/gui.cls.php(354): include(‘/home/mysite/…’)
#3 /wp-content/plugins/litespeed-cache/src/admin-display.cls.php(185): LiteSpeed\GUI->show_promo()
#4 /wp-includes/class-wp-hook.php(307): LiteSpeed\Admin_Display->enqueue_scripts()
#5 /wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#6 /wp-includes/plugin.php(476): WP_Hook->do_action()
#7 /wp-admin/admin-header.php(118): do_action()
#8 /wp-admin/edit.php(397): require_once(‘/home/mysite/…’)
#9 {main}
thrown

Or :

PHP Warning: array_merge(): Expected parameter 2 to be an array, null given in /wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Reports/Controller.php on line 336
PHP Warning: array_keys() expects parameter 1 to be array, null given in /wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Reports/Controller.php on line 336

Or :

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /wp-content/plugins/litespeed-cache/src/cloud.cls.php:505 Stack trace: #0 /wp-content/plugins/litespeed-cache/src/cloud.cls.php(465): LiteSpeed\Cloud->_get() #1 /wp-content/plugins/litespeed-cache/src/cloud.cls.php(154): LiteSpeed\Cloud::get() #2 /wp-content/plugins/litespeed-cache/src/data.cls.php(241): LiteSpeed\Cloud::version_check() #3 /wp-content/plugins/litespeed-cache/src/conf.cls.php(90): LiteSpeed\Data->try_upgrade_conf_3_0() #4 /wp-content/plugins/litespeed-cache/src/conf.cls.php(33): LiteSpeed\Conf->_conf_db_init() #5 /wp-content/plugins/litespeed-cache/src/core.cls.php(44): LiteSpeed\Conf->init() #6 /wp-content/plugins/litespeed-cache/src/root.cls.php(197): LiteSpeed\Core->__construct() #7 /wp-content/plugins/litespeed-cache/litespeed-cache.php(178): LiteSpeed\Root::cls() #8 /wp-content/plugins/litespeed-cache/litespeed-cache.php(181): run_litespeed_cache() #9 /wp-admin/includes/plugin.php(2286): include_once(‘…’) #10 /wp-admin/plugins.php(191): plugin_sandbox_scrape() #11 {main} thrown in /wp-content/plugins/litespeed-cache/src/cloud.cls.php on line 505

Or :

Cloud Error: [Service] ucss [Info] No Cloud Node available after checking server load.

Or :

Failed to communicate with QUIC.cloud server: There is proceeding queue not pulled yet. Queue info: raw 136 [priority] 6000. [server] https://node8.quic.cloud [service] img_optm

Or :

[NOTICE] [11389] [127.0.0.1:38928#APVH_io-te.dk:443] [STDERR] PHP Warning: parse_url() expects parameter 1 to be string, array given in /wp-includes/class-http.php on line 272
2021-02-08 10:35:43.469514 [NOTICE] [11389] [127.0.0.1:38928#APVH_io-te.dk:443] [STDERR] PHP Warning: parse_url() expects parameter 1 to be string, array given in /wp-content/plugins/stops-core-theme-and-plugin-updates/includes/MPSUM_Utils.php on line 37
2021-02-08 10:35:43.469383 [NOTICE] [11389] [127.0.0.1:38928#APVH_io-te.dk:443] [STDERR] PHP Warning: substr() expects parameter 1 to be string, array given in /wp-content/plugins/litespeed-cache/src/css.cls.php on line 391

Or :

#4 {main}
thrown in /home/—/public_html/wp-content/plugins/litespeed-cache/src/optimizer.cls.php on line 56
[04-Jun-2020 21:24:37 UTC] PHP Fatal error: Uncaught Error: Class ‘LiteSpeed\Lib\HTML_MIN’ not found in /wp-content/plugins/litespeed-cache/src/optimizer.cls.php:56
Stack trace:
#0 /wp-content/plugins/litespeed-cache/src/optimize.cls.php(603): LiteSpeed\Optimizer->html_min(‘…’)
#1 /wp-content/plugins/litespeed-cache/src/optimize.cls.php(315): LiteSpeed\Optimize->_optimize()
#2 /wp-content/plugins/litespeed-cache/src/core.cls.php(401): LiteSpeed\Optimize::finalize(‘…’)
#3 [internal function]: LiteSpeed\Core->send_headers_force(‘…’, 9)
#4 {main}

Or :

thrown in ~/wp-content/plugins/litespeed-cache/src/core.cls.php on line 392
PHP Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in ~/wp-content/plugins/litespeed-cache/src/gui.cls.php on line 9
PHP Fatal error: Uncaught Error: Class ‘LiteSpeed\GUI’ not found in ~/wp-content/plugins/litespeed-cache/src/core.cls.php:392

Or :

Stack trace:
#0 /wp-content/plugins/litespeed-cache/src/object-cache.cls.php(469): Redis->setex()
#1 /wp-content/plugins/litespeed-cache/src/object.lib.php(304): LiteSpeed\Object_Cache->set()
#2 /wp-content/plugins/litespeed-cache/src/object.lib.php(332): WP_Object_Cache->set()
#3 /wp-content/plugins/litespeed-cache/src/object.lib.php(59): WP_Object_Cache->add()
#4 /wp-includes/class-wp-term-query.php(883): wp_cache_add()
#5 /wp-includes/class-wp-term-query.php(307): WP_Term_Query->get_terms()
#6 /wp-includes/taxonomy.php(133 in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 471
[STDERR] PHP Fatal error:  Uncaught RedisException: OOM command not allowed when used memory > 'maxmemory'. in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php:469

Or :

Fatal error: Uncaught Error: Class ‘LiteSpeed\Root’ not found in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php:15 Stack trace: #0 /wp-content/plugins/litespeed-cache/src/object.lib.php(18): require_once() #1 /wp-content/object-cache.php(41): require_once(‘’) #2 /home/*****/lmsadvisory.com.au/wp-includes/load.php(694): require_once(‘’) #3 /wp-settings.php(131): wp_start_object_cache() #4 /wp-config.php(91): require_once(‘’) #5 /wp-load.php(50): require_once(‘’) #6 /wp-admin/admin.php(34): require_once(‘’) #7 /wp-admin/plugins.php(10): require_once(‘’) #8 {main} thrown in /wp-content/plugins/litespeed-cache/src/object-cache.cls.php on line 15

Or :

Failed to communicate with QUIC.cloud server: Unknown error: url is not defined [server] https://node5.quic.cloud [service] ccss
Cloud Error: Please try after 4m 51s for service ccss.

There are multiple solutions to try to make it work.

Updates

The first thing to do if you are stuck with LiteSpeed Cache is to ensure that all your WordPress is up to date. You should check your :

  • WordPress
  • Plugins
  • Theme

Once all these updates are done, check back if these errors appear.

Check LiteSpeed Cache

Sometimes, you just need to disable the plugin, and enable it just after to make it work again.

If it doesn’t work, your LiteSpeed Cache plugin may be corrupted. To ensure that it’s not your case, you have to re-download the plugin (or the theme delivered with the plugin) and try to install it again.

Check others plugins

Are you sure that the error is related to LiteSpeed Cache? Maybe not.

It could be related to another plugin that is not compatible. It could happen when you use a cache plugin, a security plugin, or simply a poorly developed plugin.

Disable all plugins. Then, check for your error, if the error is still there, the problem is not related to plugins compatibility. If there are no more errors, then enable every plugin one by one and check for the error. The goal is to target the plugin involved.

Try another theme

The error can be a problem with your theme.

If it’s not already done, then you should install & activate the default WordPress theme like Twenty Twenty-Two. Check for the error, and see what is happening to be sure that your WordPress theme is not the cause.

Permalinks & htaccess

If it doesn’t work, you may have a problem with your WordPress permalinks and/or your htaccess file. You should go on your WordPress dashboard, and re-saving permalinks from the permalinks page.

Contact the developer

If all these solutions don’t work, we advise you to contact the plugin developer.

You may have found a new bug, or a specific issue. You should get in touch with the developer either on the WordPress plugin forum, either by mail, either on their specific website with their own support.

Alternative solutions

If the developer doesn’t reply, or your problem is very urgent, then you should try an alternative to the plugin.

There are thousands of plugins on the official directory, and many others outside. You should try to find and test them!

If the issue is very specific, and the plugin could not be replaced, we advise you to contact an expert.
This is the best way to ensure you're not going to break your site anymore.