• Resolved Charbel Nemnom

    (@cnemnom)


    Hello Team,

    I am not able to enable the Object cache plugin. I get status: Drop-in not installed.

    Please find below the diagnostics:

    Status: Drop-in is invalid
    Client:
    Drop-in: Invalid
    Disabled: No
    PhpRedis: Not loaded
    Relay: Not loaded
    Predis: Not loaded
    Credis: Not loaded
    PHP Version: 7.4.13
    Plugin Version: 2.2.3
    Redis Version: Unknown
    Multisite: No
    Metrics: Disabled
    Metrics recorded: 0
    Filesystem: Working
    WP_REDIS_PLUGIN_PATH: “/opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/redis-cache”
    Drop-ins: [
    “object-cache.php v by “
    ]

    Could you please advise how to resolve this issue?

    Many Thanks!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Try removing the wp-content/object-cache.php you have in place right now and then go to Settings > Redis > Enable Cache

    Thread Starter Charbel Nemnom

    (@cnemnom)

    Thank you @tillkruess,

    Do you mean to delete the file object-cache.php?

    Where this file is located?

    Thread Starter Charbel Nemnom

    (@cnemnom)

    I deleted the object-cache.php file and then enable Object Cache, the Drop-in was enabled for a minute and then turned off.

    I have the Performance plugin installed by WordPress. Please see the new Diagnostics message below.

    Status: Drop-in is invalid
    Client:
    Drop-in: Invalid
    Disabled: No
    PhpRedis: Not loaded
    Relay: Not loaded
    Predis: 2.0.3
    Credis: Not loaded
    PHP Version: 7.4.13
    Plugin Version: 2.2.3
    Redis Version: Unknown
    Multisite: No
    Metrics: Disabled
    Metrics recorded: 0
    Filesystem: Working
    WP_REDIS_PLUGIN_PATH: “/opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/redis-cache”
    Drop-ins: [
    “Performance Lab Server Timing Object Cache Drop-In v1 by WordPress Performance Team”
    ]

    Please find a copy of my current object-cache.php file: What should be changed?

    <?php
    /**

    • Plugin Name: Performance Lab Server Timing Object Cache Drop-In
    • Plugin URI: https://github.com/WordPress/performance
    • Description: Performance Lab drop-in to register Server-Timing metrics early. This is not a real object cache drop-in and will not override other actual object cache drop-ins.
    • Version: 1
    • Author: WordPress Performance Team
    • Author URI: https://make.www.ads-software.com/performance/
    • License: GPLv2 or later
    • License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
      *
    • Object cache drop-in from Performance Lab plugin.
      *
    • This drop-in is used, admittedly as a hack, to be able to measure server
    • timings in WordPress as early as possible. Once a plugin is loaded, it is
    • too late to capture several critical events.
      *
    • This file respects any real object cache implementation the site may already
    • be using, and it is implemented in a way that there is no risk for breakage.
      *
    • If you do not want the Performance Lab plugin to place this file and thus be
    • limited to server timings only from after plugins are loaded, you can remove
    • this file and set the following constant (e.g. in wp-config.php):
      *
    • define( ‘PERFLAB_DISABLE_OBJECT_CACHE_DROPIN’, true );
      *
    • @package performance-lab
    • @since 1.8.0
      */

    // Set constant to be able to later check for whether this file was loaded.
    define( ‘PERFLAB_OBJECT_CACHE_DROPIN_VERSION’, 1 );

    /**

    • Loads the Performance Lab Server-Timing API if available.
      *
    • This function will short-circuit if the constant
    • ‘PERFLAB_DISABLE_OBJECT_CACHE_DROPIN’ is set as true.
      *
    • @since 1.8.0
      */
      function perflab_load_server_timing_api_from_dropin() {
      if ( defined( ‘PERFLAB_DISABLE_OBJECT_CACHE_DROPIN’ ) && PERFLAB_DISABLE_OBJECT_CACHE_DROPIN ) {
      return;
      } $plugins_dir = defined( ‘WP_PLUGIN_DIR’ ) ? WP_PLUGIN_DIR : WP_CONTENT_DIR . ‘/plugins’;
      $plugin_dir = $plugins_dir . ‘/performance-lab/’;
      if ( ! file_exists( $plugin_dir . ‘server-timing/load.php’ ) ) {
      $plugin_dir = $plugins_dir . ‘/performance/’;
      if ( ! file_exists( $plugin_dir . ‘server-timing/load.php’ ) ) {
      return;
      }
      } require_once $plugin_dir . ‘server-timing/class-perflab-server-timing-metric.php’;
      require_once $plugin_dir . ‘server-timing/class-perflab-server-timing.php’;
      require_once $plugin_dir . ‘server-timing/load.php’;
      require_once $plugin_dir . ‘server-timing/defaults.php’;
      }
      perflab_load_server_timing_api_from_dropin();

    // Load the original object cache drop-in if present.
    if ( file_exists( WP_CONTENT_DIR . ‘/object-cache-plst-orig.php’ ) ) {
    require_once WP_CONTENT_DIR . ‘/object-cache-plst-orig.php’;
    }

    Plugin Author Till Krüss

    (@tillkruess)

    You need to turn off the server timing from Performance, it interferes with object caching.

    Thread Starter Charbel Nemnom

    (@cnemnom)

    Thank you @tillkruess for your support, much appreciated!

    Yes, the issue was caused by the Performance Lab plugin overwriting the /wp-content/object-cache.php as documented here: https://www.ads-software.com/support/topic/plugin-overwrites-existing-third-party-wp-content-object-cache-php/

    To solve this issue, I disabled the Performance Lab plugin, then activated Redis Object Cache and added this line:

    define( 'PERFLAB_DISABLE_OBJECT_CACHE_DROPIN', true );

    Then activated Performance Lab plugin and everything is working fine.

    I have noticed that you just released a new version 2.2.4 to fix this issue (Prevent Perflab from overwriting the object cache drop-in), right?

    Last, I want to confirm that I am all set here. Please find below the copy of my Diagnostics page after fixing the Drop-In issue and installing Redis on my Linux Debian server. Could you please confirm?

    I am seeing that everything is working as expected, and the performance is great.

    Do I still need to install PhpRedis as well?

    Many Thanks!!!

    Status: Connected
    Client: Predis (v2.1.1)
    Drop-in: Valid
    Disabled: No
    Ping: PONG
    Errors: []
    PhpRedis: Not loaded
    Relay: Not loaded
    Predis: 2.1.1
    Credis: Not loaded
    PHP Version: 7.4.13
    Plugin Version: 2.2.4
    Redis Version: 5.0.14
    Multisite: No
    Metrics: Enabled
    Metrics recorded: 548
    Filesystem: Working
    Global Prefix: "wp_"
    Blog Prefix: "wp_"
    WP_REDIS_PLUGIN_PATH: "/opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/redis-cache"
    Global Groups: [
    "blog-details",
    "blog-id-cache",
    "blog-lookup",
    "global-posts",
    "networks",
    "rss",
    "sites",
    "site-details",
    "site-lookup",
    "site-options",
    "site-transient",
    "users",
    "useremail",
    "userlogins",
    "usermeta",
    "user_meta",
    "userslugs",
    "redis-cache",
    "blog_meta"
    ]
    Ignored Groups: [
    "counts",
    "plugins",
    "themes",
    "wordfence",
    "wordfence-ls",
    "WPForms_Entry_Handler"
    ]
    Unflushable Groups: []
    Groups Types: {
    "blog-details": "global",
    "blog-id-cache": "global",
    "blog-lookup": "global",
    "global-posts": "global",
    "networks": "global",
    "rss": "global",
    "sites": "global",
    "site-details": "global",
    "site-lookup": "global",
    "site-options": "global",
    "site-transient": "global",
    "users": "global",
    "useremail": "global",
    "userlogins": "global",
    "usermeta": "global",
    "user_meta": "global",
    "userslugs": "global",
    "redis-cache": "global",
    "counts": "ignored",
    "plugins": "ignored",
    "themes": "ignored",
    "blog_meta": "global",
    "wordfence": "ignored",
    "wordfence-ls": "ignored",
    "WPForms_Entry_Handler": "ignored"
    }
    Drop-ins: [
    "Redis Object Cache Drop-In v2.2.4 by Till Krüss"
    ]
    Plugin Author Till Krüss

    (@tillkruess)

    Yes, you’re all set. Glad you found the the solution yourself.

    Thread Starter Charbel Nemnom

    (@cnemnom)

    Many Thanks, @tillkruess !

    Keep up the good work.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘I Can’t enable Object Cache: Drop-in not installed’ is closed to new replies.