• Resolved boybawang

    (@boybawang)


    I’m using PHP version 7.4, and noticed that there are extensions for memcache, memcached and redis that are disabled by default. Would you recommend enabling those so that I can use them for object and database caching within W3TC?

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

    (@vmarko)

    Hello @boybawang

    Thank you for reaching out and I am happy to assist you with this.
    If the bottleneck of your website performance in Database, then it’s recommended to use DB cache and Object Cache. For these modules, it’s best to use memory-based caching like Redis or Memcached and Disk Caching for DB and OC should be avoided.
    It’s up to you which caching method you want to use – Redis or Memcached. Make sure that the PHP extension is properly installed, and once enabled you can use it as a caching method in W3 Total Cache.
    Thanks!

    Thread Starter boybawang

    (@boybawang)

    Hello @vmarko – Thanks for your reply.

    When I install and enable memcached, I get the following errors in the WP admin section:

    The following memcached servers are not responding or not running:
    
    Database Cache: 127.0.0.1:11211.
    Object Cache: 127.0.0.1:11211.
    This message will automatically disappear once the issue is resolved.

    When I install and enable redis, I get the following in my PHP error log:
    Connection refused

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @boybawang

    Thank you for your feedback.
    Please make sure that the latest Memcached module is installed https://memcached.org/files/memcached-1.6.9.tar.gz
    telnet 127.0.0.1 11211
    Should communicate with Memcached and respond to status commands etc.
    Check the service at the CLI/SSH: memcached-tool 127.0.0.1:11211 display and memcached-tool 127.0.0.1:11211 stats.
    Look if the service is running: ps afux | grep memc (edited)

    Restart the service if needed (as root/sudo): service memcached restart.

    I hope this helps!

    Thanks!

    Thread Starter boybawang

    (@boybawang)

    Hi @vmarko

    Thanks for the recommendation. I’m currently using PHP 7.4, but hope to update to PHP 8 or 8.1 soon. Do you know if the latest PHP versions automatically have the latest version of memcached?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @boybawang

    Thanks for the feedback.
    Sorry, the provided link was not the latest release.
    Memcached is regularly updated there should be no problem with compatibility.
    Thanks!

    Thread Starter boybawang

    (@boybawang)

    Thanks @vmarko!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Should I enable memcache, memcached or redis within PHP on my server?’ is closed to new replies.