How to connect WordPress to the memcached installed in Docker container?

Follow

Comments

4 comments

  • Avatar
    Christopher-James Sheppard

    Hi, ive installled memcached and is running but in W3TC all i get is the warning

     

    The following memcached servers are not responding or not running:

    • Object Cache: 127.0.0.1:11211.
    • Page Cache: 127.0.0.1:11211.

    This message will automatically disappear once the issue is resolved.

     

     

    0
    Comment actions Permalink
  • Avatar
    Alexandr Redikultsev

    Hello, @Christopher-James Sheppard.

    Make sure that both commands below are working properly:

    # { echo "stats"; sleep 1; } | telnet localhost 11211 | grep "get_"
    # { echo "stats"; sleep 1; } | telnet 127.0.0.1 11211 | grep "get_"

    0
    Comment actions Permalink
  • Avatar
    Dennis Am

    Please note that creating a docker container will open its port (in this case 11211) to the internet, as Plesk Firewall doesn't work for Docker (see https://support.plesk.com/hc/en-us/articles/360011626333-Plesk-Firewall-deny-rules-do-not-block-connections-to-Docker-container). Running a simple iptables command ensures that the port is closed for the internet so it can't be abused. Could you please consider adding this information to the article for improved security?

    0
    Comment actions Permalink
  • Avatar
    Daria Gavrilova

    Hello @Dennis Am,

    Thank you for your input.

    The article will be modified accordingly.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request