• Resolved Blue2 GmbH

    (@blue2shop)


    Since our host offers an object cache with Redis and WordPress keeps reporting that an object cache would be better, I downloaded the plugin. With the help of the hoster’s support team, I adapted the wp_config.php accordingly.
    The dashboard shows that everything is working.

    Only when I activate Redis do I get this error message from WordPress.

    After I told the hoster’s support, he wrote to me that he could access the cache via the specified port and that the server was running.

    What can I do now?

    Kind regards,
    Johannes

    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)

    Hey there! Sorry, I don’t follow. Who are you hosting with?

    Thread Starter Blue2 GmbH

    (@blue2shop)

    Hello,

    we are a customer of Easyname.at

    Plugin Author Till Krüss

    (@tillkruess)

    It looks like they do support Redis Object Cache.

    Can you ask their support team to take a look at your wp-config.php file to ensure it’s all configured correctly?

    Thread Starter Blue2 GmbH

    (@blue2shop)

    Hello Till,
    our wp-config.php was configurated by the support team.
    After that the Redis was reachable, but we had the reported error…

    Kind regads,
    Johannes

    Thread Starter Blue2 GmbH

    (@blue2shop)

    I can connect easily using SSH (port 10844) and can access the Redis server using the socket directory.

    The wp_config.php has been expanded to include the following

    define('WP_REDIS_PATH', '/OurRedisAddress');
    define('WP_REDIS_PORT', '6379');
    define('WP_REDIS_DATABASE', '0');
    define('WP_REDIS_SCHEME', 'unix');

    The connection exists And the diagnosis shows the following

    Diagnostics shows this

    Status: Nicht aktiviert
    Client: 
    Drop-in: Not installed
    Disabled: No
    PhpRedis: 5.3.7
    Relay: Not loaded
    Predis: 2.1.2
    Credis: Not loaded
    PHP Version: 8.1.18
    Plugin Version: 2.5.1
    Redis Version: Unknown
    Multisite: No
    Metrics: Disabled
    Metrics recorded: 0
    Filesystem: Writable
    WP_REDIS_SCHEME: "unix"
    WP_REDIS_PATH: "OurRedisAddress"
    WP_REDIS_PORT: "6379"
    WP_REDIS_DATABASE: "0"
    WP_REDIS_PLUGIN_PATH: "/Installationpath/wp-content/plugins/redis-cache"
    Drop-ins: [
        "advanced-cache.php v by "
    ]

    But after activation it shows the error again

    How can we fix this?

    Kind regards,
    Johannes

    Plugin Author Till Krüss

    (@tillkruess)

    Hi Johannes,

    In that case the Redis socket is not reachable.

    You can try this code snippet, and remove WP_REDIS_PORT entirely.

    define( 'WP_REDIS_SCHEME', 'unix' );
    define( 'WP_REDIS_PATH', '/path/to/redis.sock' );

    If that does not resolve it, you need to ask your hosting staff to provide the correct path the Redis socket.

    Thread Starter Blue2 GmbH

    (@blue2shop)

    Hello Till,
    I tried it, but it didn’t work.
    However, I found the solution by editing the port in wp_config.php (instead 6379 with 0)…

    Thanks for your help!
    Kind regards,
    Johannes

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error establishing a Redis connection’ is closed to new replies.