Support » Plugin: Redis Object Cache » Enabling with Predis and Remote Redis

  • Resolved trevorseward


    I have the plugin installed and used the defines to point to my Azure-hosted Redis account.

    In wp_config, I’ve defined:

    I’ve copied Predis.php to ./wp-content/predis. Despite this, after activating the plugin, it shows Redis as Not Connected.

    Any thoughts?

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


    You don’t need to copy Predis anywhere. The dropin should use the bundled Predis version of the plugin.

    I’ve got the same issue with connecting to the Azure Redis Cache service. Is there any kind of log or trace, which I could look at?

    Thanks. And just to confirm that Predis/Azure Redis is working, I’ve been using this for some time via

    Plugin Author Till Krüss


    Is the plugin working for you now trevorseward?

    No, the method I’ve been using is outlined in the link which involves manually placing predis with an appropriate index…php that leverages it. Your plugin does not work with Azure Redis, for whatever reason.

    Plugin Author Till Krüss


    Mhhh, it’s probably as repelled by Microsoft products as I am. The plugin code is on GitHub, feel free to submit a fix:

    Ok, so it sounds like this plugin was not tested against remote Redis instances via TCP, since this works just fine using the other method provided.

    I was able to solve my issue by using the tcp protocol instead of http, as well as enabling Non-SSL-Traffic on my Azure Redis Service.

    define(‘WP_REDIS_SCHEME’, ‘tcp’);
    define(‘WP_REDIS_HOST’, ‘<MyRedisServiceName>’);
    define(‘WP_REDIS_PORT’, ‘6379’);
    define(‘WP_REDIS_DATABASE’, ‘0’);
    define(‘WP_REDIS_PASSWORD’, ‘<MyRedisServicePrimaryKey>’);

    Plugin Author Till Krüss


    Does that work for you as well, trevorseward?

    Unfortunately not! I’m using the exact same configuration settings, too. And I’m currently using tcp:// to my Redis instance via Predis, so that’s a bit of a bummer.

    Plugin Author Till Krüss


    Could you post the configuration you’re using?

    Sure! So the previous method I linked to uses this:

    $redis = new Predis\Client('tcp://');

    For this plugin, I tried using this in the wp-config.php:

    define('WP_REDIS_SCHEME', 'tcp');
    define('WP_REDIS_HOST', '');
    define('WP_REDIS_PORT', '6379');
    define('WP_REDIS_DATABASE', '0');
    define('WP_REDIS_PASSWORD', 'myRedisKey');

    Let me know if anything looks incorrect.


    Plugin Author Till Krüss


    Try adding:

    define( 'WP_REDIS_CLIENT', 'predis' );

    I had tried that previously — no luck unfortunately.

    One thing, unsure if it is important for this plugin, my admin site is SSL-only, where as the site is non-SSL.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Enabling with Predis and Remote Redis’ is closed to new replies.