简体   繁体   中英

W3 Total Cache (and Wordpress) not recognizing memcached after installation

Ok, so I'm trying to enable the memcached mode of the W3 Total Cache on my Wordpress site to get better performance compared to the disk mode I have at the moment.

The memcached option in the Page Cache Method: drop-down menu of the W3TC settings page was greyed out and disabled since memcached was not installed in my machine. Thus I followed instructions from this website and this question and ran the following commands:

apt-get -y update && \

apt-get install -y memcached && \
service memcached start

apt-get install -y git nano vim netcat && \
apt-get install -y libmemcached-dev libmemcached11 git build-essential  && \
apt-get install -y pkg-config zlib1g-dev && \

git clone https://github.com/php-memcached-dev/php-memcached && \
(cd php-memcached && \
git checkout php7 && \
git pull  && \

phpize && \
./configure --with-php-config=php-config && \

make && \
make install)

memcached is successfully installed and say echo "stats settings" | netcat localhost 11211 echo "stats settings" | netcat localhost 11211 works perfectly, but the problem persists and the phpinfo() page doesn't have a section for memcached . This is obviously because my Wordpress does NOT yet recognize memcached as a possible method for caching stuff.

So, what I'm asking is how can I make my Wordpress understand that memcached is a possible caching method?? :) Am I missing any configuration step?

I'm using PhP 7.2.28 and Wordpress 5.3.2 on Debian GNU/Linux 10 .

Do you have PHP-FPM installed? I've run into issues where I've forgotten to restart it after installing something new.

Check what version of php you are currently using by running the following command,

sudo php -v

The chances are memchached is not installed on the version of php you are using.

In your case, you need to try the following,

sudo apt install php7.2-memcached

And reboot server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM