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
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
.
2
Answers
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,
The chances are memchached is not installed on the version of php you are using.
In your case, you need to try the following,
And reboot server.