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

---

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

 *  [matteo raggi](https://wordpress.org/support/users/whichtransfers/)
 * (@whichtransfers)
 * [15 hours, 33 minutes 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 1 replies (of 1 total)

 *  [wpfixpath](https://wordpress.org/support/users/wpfixpath/)
 * (@wpfixpath)
 * [15 hours, 25 minutes ago](https://wordpress.org/support/topic/fatal-error-enabling-object-cache-redis-undefined-function/#post-18903299)
 * This looks like two separate checks, not only a Redis credential problem.
    1. The failed Redis connection test should be isolated first:
 *  - confirm the exact Redis host/port/password from the hosting panel
    - if the host provides a Redis CLI/test tool, test the same host/port/password
      outside WordPress
    - confirm whether Redis is available to PHP on the same account/container, not
      just enabled in cPanel
 *  1. The fatal error is a different signal. An “undefined function” inside the LiteSpeed
       object-cache save path usually points to a stale/partial plugin/drop-in/bootstrap
       state, not normal Redis failure.
 * I would test this sequence on one affected site only:
    - leave Object Cache OFF
    - delete `wp-content/object-cache.php`
    - delete `wp-content/advanced-cache.php` only if you know it belongs to the 
      previous cache setup
    - fully remove the LiteSpeed Cache plugin folder, not just deactivate/reactivate
    - reinstall a clean copy of LiteSpeed Cache
    - restart/flush PHP OPcache if the host exposes that option
    - test on PHP 8.3 first, not 8.4/8.5
    - then enable Object Cache again
 * If the same fatal error appears after a clean plugin reinstall + no old drop-
   in + OPcache flush, then it is likely a LiteSpeed Cache 7.8.x bug or host-specific
   bootstrap bug and worth reporting with the exact plugin version, PHP version,
   and stack trace.
 * For now, keeping Object Cache disabled and using page cache only is the right
   safe state.

Viewing 1 replies (of 1 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [wpfixpath](https://wordpress.org/support/users/wpfixpath/)
 * Last activity: [15 hours, 25 minutes ago](https://wordpress.org/support/topic/fatal-error-enabling-object-cache-redis-undefined-function/#post-18903299)
 * Status: not resolved