Excellent software and practical tutorials
Install the imagick extension
I just installed WordPress recently and encountered the problem of not being able to edit pictures when using WordPress. I found that it was an optional module.imagickNot installed or disabled. First install on CentOS8ImageMagick.
What is ImageMagick?
ImageMagick is a free software for creating, editing, and compositing images. It can read, convert, and write images in various formats. Image cutting, color replacement, application of various effects, image rotation, combination, text, lines, polygons, ellipses, curves, and image stretching and rotation can be attached to images. ImageMagick is free software: all source code is open, and it can be freely used, copied, modified, and published. It complies with the GPL license agreement and can run on most operating systems. Most of the functions of ImageMagick are used from command line tools.
First install ImageMagick
yum install ImageMagick -y
yum install ImageMagick-devel -y
The site health page on the WordPress backend keeps prompting that there are problems with these two modules, as shown in the following figure:
The solution is to install the imagick extension of PHP. The PHP7.4.6 installed on the server. I did not find the imagick extension in the data source, so I had to install it manually.
First check if the imagick extension is installed
php -m | grep -i "imagick"
If there is no output, imagick is not installed.
Start installing the imagick extension
Imagick's official website:https://pecl.php.net/package/imagick
The latest version is 3.4.4
wget https://pecl.php.net/get/imagick-3.4.4.tgz
tar -xzvf imagick-3.4.4.tgz
cd imagick-3.4.4
phpize
./configure
make
make install
Modify the PHP configuration file to enable the imagick extension
Modify the PHP configuration file "php.ini" and add the following content to the configuration file to make the imagick extension take effect:
extension=imagick.so
The final step is to check whether the installation is effective:
php -m | grep -i "imagick"
If it is outputimagickIndicates that the installation was successful.