[Hummingbird] Hummingbird removing Redis line in wp-config

Just reporting an issue with Hummingbird. One of the recommendations from HB is using Redis cache. I'm using that but it requires a few lines to placed into the wp-config.php file. HM is removing one of the lines which makes Redis not work properly.

So what's pasted into the wp-config file is this:

define('WP_REDIS_PASSWORD', '156cbd8b48170b04feb5b7ff8a2xxxxx':wink:;
define('WP_REDIS_HOST', '127.0.1.xx':wink:;
define('WP_REDIS_PORT', '409xx':wink:;
define( 'WP_CACHE_KEY_SALT', 'minnesota-entertainment.com/beta':wink:;

When activating or changing settings inside HM, it removes this Redis line:
define( 'WP_CACHE_KEY_SALT', 'minnesota-entertainment.com/beta':wink:;

It would be great if it wouldn't do that. Thank you!

  • viobru
    • Recruit

    Hi, twinsmagic!

    Hope you are doing great :slight_smile:

    Thanks for pointing this up. Just to clarify, are you getting any comment on wp-config.php for that line that informs that the line was deleted by Hummingbird? If so, could you please share the details of the comment, please?

    On the other hand, from what I see under the 2 major plugins for Redis, I understand that this setting should not be necessary on a WP single install, as yours:

    On WP Redis'installation page it says: (Optional) To use the same Redis server with multiple, discreet WordPress installs, you can use the WP_CACHE_KEY_SALT constant to define a unique salt for each install. And on Redis Object Cache's Configuration Parameters it mentions: WP_CACHE_KEY_SALT (default: not set) - Set the prefix for all cache keys. Useful in setups where multiple installs share a common wp-config.php or $table_prefix to guarantee uniqueness of cache keys. Could you please tell us which plugin are you usingto enable Redis on the site?

    Many thanks in advance and Happy New Year!

    Kind regards,
    Violeta

  • twinsmagic
    • The Incredible Code Injector

    The plugin I'm using is this one:
    https://premium.wpmudev.org/forums/topic/hummingbird-hummingbird-removing-redis-line-in-wp-config#post-1366300

    I do believe that part of the code is necessary. No there are no comments. The folks at Redis support confirmed it is HB removing that line. Here's part of what they said:

    Hummingbird searched for WP_CACHE in wp-config.php and mistakenly took out WP_CACHE_SALT too. Surely enough, here's the line of code in Hummingbird:

    class-module-page-cache.php: if ( preg_match( "/define\(\s*\'WP_CACHE/i", $line ) ) {

    I hope this helps.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.