WordPress: The optional module bcmath/imagick is not installed or has been disabled
Tips when using WordPress Tools - Site Health:可选的模组bcmath/imagick未被安装或已被禁用
Solution
bcmath
yum install php-bcmath/service php-fpm restart
imagick
Before installing the Imagick extension, let’s briefly talk about two concepts:
ImageMagick, a third-party image processing software, has more powerful functions than GD. It is recommended to install both as there is no conflict.
Imagick is an extension module of PHP, which calls the API provided by ImageMagick to operate images.
So before installing the imagick extension, ImageMagick must be installed first.
Install ImageMagick
yum install ImageMagick
convert -version #能看到版本号就是安装成功
yum install php-pear php-dev #安装依赖
yum install ImageMagick-devel #安装依赖
Install imagick
去官网查找需要的版本:https://pecl.php.net/package/imagick
下载包:wget http://pecl.php.net/get/imagick-3.4.4.tgz
解压包:tar -zxvf imagick-3.4.4.tgz
进入包文件夹 cd ./imagick-3.4.4
phpize
./configure
make && make install
vim /etc/php.ini #配置php.ini
文件查找: ( find / -name php.ini )
添加 extension=imagick.so ,大概在880行左右,在vi/vim下可用(‘/extension=’ 快速定位)
service php-fpm restart #重启php-fpm