• Resolved bradman334

    (@bradman334)


    Hi,

    I am (yet another person!) having trouble with W3TC and Redis. WordPress and Redis are on the same server.

    I have:
    – installed and verified that Redis is running (ping/pong).
    – installed phpredis and verified with php -r "if (new Redis() == true){ echo \"OK \r\n\"; }"
    – followed the FAQ and added db-config.php in the plugin ini folder with (taken from the sample in the same dir):

    
    <?php
    
    define( 'W3TC_CONFIG_CACHE_ENGINE', 'redis');
    define( 'W3TC_CONFIG_CACHE_REDIS_SERVERS', '127.0.0.1:6379' );

    The Redis option is still disabled and I am not sure where to look next.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @bradman334

    I am sorry about the issue you are having with activating Redis and I am happy to assist you with this.
    Just to make sure, have you followed these instructions on how to install PHP Redis?
    Have you tried restarting your webs server?

    Thread Starter bradman334

    (@bradman334)

    Hi Marko,

    I haven’t followed them explicitly because the phpredis module was already installed in our apache server. I can confirm it using phpinfo() in a php file in our theme.

    I also tried putting the following in the file:

    <?php
    
    // Connecting to Redis server on localhost
    $redis = new Redis();
    $redis->connect('127.0.0.1', 6379);
    echo "Connection to Redis server successful<br />";
    echo "Server is running: ".$redis->ping();
    
    phpinfo();
    
    ?>
    

    The output is:

    
    Connection to Redis server successful
    Server is running: 1
    
    phpinfo output...
    
    • This reply was modified 5 years, 1 month ago by bradman334.
    • This reply was modified 5 years, 1 month ago by bradman334.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @bradman334

    Have you tried to restart your web server and check if you can select redis after that?

    You need to install, using the apt-get install redis-server, redis-tools and php-redis and in the config for redis check out IP and port.

    Restart web server – apache.
    Validate it you can see it in phpinfo().
    Try the button “Test” in W3TC settings page for redis – if successfull, great it’s working.

    I did not needed to custom write into files db, advanced-cache, object-cache.

    Just copy them from the plugin’s /wp-content/ to your /wp-content/ folder.

    • This reply was modified 5 years, 1 month ago by Fritex.
    Thread Starter bradman334

    (@bradman334)

    Hi Marko. I was hoping to avoid a restart. It doesn’t seem right that a WordPress plugin would require a restart for a feature to become enabled. But in the absence of any other solution I can schedule a quiet time to try it.

    Tomislav, read my last reply and you will see that I have done all the things you suggest including verifying it with phpinfo() and making a call to Redis from php code.

    Thread Starter bradman334

    (@bradman334)

    The good news is that I restarted the server and now I can select Redis. Thanks Marko.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @bradman334

    You are most welcome!
    We would really appreciate it if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users. Thank you for your help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Redis option not enabled’ is closed to new replies.