Title: Fatal error enabling Object Cache (Redis) – undefined function
Last modified: May 9, 2026

---

# Fatal error enabling Object Cache (Redis) – undefined function

 *  Resolved [matteo raggi](https://wordpress.org/support/users/whichtransfers/)
 * (@whichtransfers)
 * [3 weeks, 6 days ago](https://wordpress.org/support/topic/fatal-error-enabling-object-cache-redis-undefined-function/)
 * Hi,
 * I am experiencing a fatal error when trying to enable Object Cache (Redis) in
   the LiteSpeed Cache plugin on multiple WordPress sites.
 * Environment:
    - WordPress 6.9.4
    - LiteSpeed Cache plugin 7.8.1
    - PHP 8.3 / 8.4 / 8.5.5 (same result on all)
    - Web server: LiteSpeed (managed by hosting.com)
    - Redis: enabled from cPanel, Status = Running, Host = 127.0.0.1, Port = 42527,
      Password enabled, 16 databases
 * Steps:
 * 1) Removed all old caching plugins (A2 Optimized etc.), including their advanced-
   cache.php and object-cache.php files.
   2) Removed any wp-content/object-cache.
   php drop-in from all sites.3) Fresh install of LiteSpeed Cache plugin.4) Configured
   Object Cache as:
    - Object Cache: ON
    - Method: Redis
    - Host: 127.0.0.1
    - Port: 42527
    - Password: from cPanel Redis
    - Redis DB ID: 0 or 1
 * Issue:
    - The connection test shows “Connection test: Failed”.
    - When saving Object Cache settings, WordPress goes into critical error with
      this message (identical on several sites):
 * Uncaught Error: Call to undefined function LiteSpeed\litespeed_oc_disable_ext_cache()
   
   in wp-content/plugins/litespeed-cache/src/object-cache.cls.php:586
 * Stack trace:
   `LiteSpeed\Object_Cache->_connect()LiteSpeed\Object_Cache->_reconnect()
   LiteSpeed\Object_Cache->update_file()LiteSpeed\Activation->update_files()LiteSpeed\
   Conf->update_confs()LiteSpeed\Admin_Settings->save()LiteSpeed\Admin->_proceed_admin_action()…
 * In wp-admin I also had:
   “Can NOT find LSCWP path for object cache initialization
   in wp-content/object-cache.php”
 * After deleting wp-content/object-cache.php this message disappeared, but the 
   fatal error on litespeed_oc_disable_ext_cache() persists when trying to enable
   Redis Object Cache.
 * Questions:
    - Is this a known issue in LSCache 7.8.x with PHP 8.3 / 8.4 / 8.5?
    - Is there a recommended workaround (e.g. specific LSCache version, configuration
      or PHP version) to avoid this “undefined function litespeed_oc_disable_ext_cache()”
      error when enabling Object Cache?
    - Should the object-cache.php drop-in be created/managed differently in this
      case?
 * For now, I have disabled Object Cache and I am only using page cache, which works
   fine. Any guidance on how to use Redis Object Cache safely in this environment
   would be appreciated.
 * Thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-enabling-object-cache-redis-undefined-function%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [3 weeks, 4 days ago](https://wordpress.org/support/topic/fatal-error-enabling-object-cache-redis-undefined-function/#post-18904226)
 * [@whichtransfers](https://wordpress.org/support/users/whichtransfers/) do you
   have the latest LSC version installed? I know there were issues with OC in 7.8
   but was fixed later.
   And make sure the `object-cache.php` from `wp-content` has
   the correct content(maybe delete it).
 *  [fooey](https://wordpress.org/support/users/fooey/)
 * (@fooey)
 * [3 weeks, 3 days ago](https://wordpress.org/support/topic/fatal-error-enabling-object-cache-redis-undefined-function/#post-18904875)
 * Same issue. As this user already noted, we are also on 7.8.1.
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [3 weeks, 3 days ago](https://wordpress.org/support/topic/fatal-error-enabling-object-cache-redis-undefined-function/#post-18905001)
 * [@whichtransfers](https://wordpress.org/support/users/whichtransfers/) and [@fooey](https://wordpress.org/support/users/fooey/)
   Are you able to edit any settings from LSC => Cache?
   What is the state of your
   site/admin? is it accessible?
 *  [fooey](https://wordpress.org/support/users/fooey/)
 * (@fooey)
 * [3 weeks, 3 days ago](https://wordpress.org/support/topic/fatal-error-enabling-object-cache-redis-undefined-function/#post-18905955)
 * It wasn’t accessible before I deleted the object-cache.php, but it is now. I 
   can edit settings. I just disabled object cache for now until this is resolved.
   It does make a difference in site speed, though, so it would be nice to figure
   this out. Also, worth noting, we manage several sites, and not all of them experienced
   this issue and are still connected so it’s not across the board. Thanks!
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [3 weeks, 2 days ago](https://wordpress.org/support/topic/fatal-error-enabling-object-cache-redis-undefined-function/#post-18906345)
 * [@whichtransfers](https://wordpress.org/support/users/whichtransfers/) and [@fooey](https://wordpress.org/support/users/fooey/)
   we have a dev build that has a patch for this issue.
   DISCLAIMER: this is a unstable,
   incomplete, work in progress build. If you try it, we do not encourage you to
   leave it on LIVE. For example, at this moment VPI, UCSS, CCSS is not working.
   You can test this build by going to LSC => Toolbox => Beta TestClick on `dev`
   then on `Update`
 * Please tell us if this fixes the error issue.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-enabling-object-cache-redis-undefined-function%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](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/)

 * 5 replies
 * 4 participants
 * Last reply from: [litetim](https://wordpress.org/support/users/litetim/)
 * Last activity: [3 weeks, 2 days ago](https://wordpress.org/support/topic/fatal-error-enabling-object-cache-redis-undefined-function/#post-18906345)
 * Status: resolved