Symptoms
-
The following optimization guide was implemented for Redis: How To Optimize WordPress With Redis And Docker
-
WordPress > example.com > Log in > Plugins > Redis Object Cache Plugin > Settings shows as Not Connected:
Not connected
-
PHPRedis
installed is 3.0:# rpm -qa | grep redis
plesk-php73-redis-3.0.0-1centos.7.190906.1643.x86_64
Cause
Latest Redis required is PHPRedis
5.0.
This has been reported as bug IDÂ PPP-45378 which has been fixed in Plesk 18.0.29.
Resolution
Workaround
At first, log into the server via SSH and prepare the environment:
For rpm-based OS (CentOS, RHEL, CloudLinux)
# yum install gcc libmemcached-devel zlib-devel
# yum install plesk-php56-devel plesk-php70-devel plesk-php71-devel plesk-php72-devel plesk-php73-devel
For deb-based OS (Debian, Ubuntu)
# apt install autoconf automake gcc libmemcached-dev libhashkit-dev pkg-config plesk-php..-dev zlib1g-dev
-
Then, use the following instructions to upgrade redis:
Note: in the example below, instructions for PHP 7.3 are provided.
-
Upgrade the redis extension:
# /opt/plesk/php/7.3/bin/pecl upgrade redis
-
It might show the following warning. Just press ‘Enter’ without specifying anything to continue the installation:
# /opt/plesk/php/7.3/bin/pecl upgrade redis
pecl/redis can optionally use PHP extension “igbinary” (version >= 2.0)
pecl/redis can optionally use PHP extension “msgpack” (version >= 2.0)
downloading redis-3.0.4.tgz …
Starting to download redis-3.0.4.tgz (78,776 bytes)
………………done: 78,776 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
libmemcached directory [no] : -
Register extension in configuration file:
# echo “extension=redis.so” > /opt/plesk/php/7.3/etc/php.d/redis.ini
-
Update PHP handlers information:
# plesk bin php_handler –reread
-
Restart Apache in Tools & Settings > Services Management.
Note: In case FPM service is used, it is required to restart FPM service as well. It can be done through Tools & Settings > Services Management.
-