Question

Wordpress Site health show imagick, is not installed, or has been disabled.

Posted March 20, 2021 2.3k views
ApachePHPWordPressUbuntu 18.04

My wordpress Site health show imagick, is not installed, or has been disabled. So I installed imagick and php-imagick by command line.

sudo apt-get install imagemagick
sudo apt-get install php-imagick
sudo service apache2 restart

But now imagick still missing on worpress. What should I do next?

Thanks in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
3 answers

Hello, @eakrin

What happens when you execute the following commands on the server?

  • php -i | grep -i imagick
  • php -m | grep imagick

Can you share the output? Also what you can do is to create an info.php file. You can create a file named info.php (the name doesn’t really matter) and put the following content in the file:

  • <?php
  • phpinfo();

You can then check which is the configuration file - php.ini that is currently used and so we can edit it. You can also check this with the PHP -i command again:

  • php -i | grep -i php.ini

Then you can edit the listed php.ini and add the following line:

extension=imagick

Note that this line can already exist there but might be commented out, e.g listed like this:
;extension=imagick

If that is the case just remove the ; and save the php.ini file.

Once this is done you can restart the Apache server and check again.

  • sudo service apache2 restart

Hope that this helps!
Regards,
Alex

Result of command php -i | grep -i imagick and php -m | grep imagick is nothing.

In infol.php

System  Linux wordpress-18 4.15.0-96-generic #97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020 x86_64
Build Date  Feb 23 2021 15:12:05
Server API  Apache 2.0 Handler
Virtual Directory Support   disabled
Configuration File (php.ini) Path   /etc/php/7.4/apache2
Loaded Configuration File   /etc/php/7.4/apache2/php.ini
Scan this dir for additional .ini files /etc/php/7.4/apache2/conf.d

My php.ini should be in /etc/php/7.4/apache2 But I try to add

extension=imagick

after restart apache nothing happen.

So I try php -i | grep -i php.ini The result is /etc/php/7.4/cli so I added extension to this php.ini file. This time result is

unable to load dynamic library 'imagick', /usr/lib/php/20190902/imagick No such file of directory, cannot open shared object file

I search for imagick.so in /usr/lib/php/20190902. It not found. But it’s in /usr/lib/php/20190930.

I think this cause a problem. The wrong library location in setting. But how can I modified location of imagick.so?

Thanks.

  • I am facing the same issue. upgraded ubuntu from 16.04 to 20.04 and now my php 7.2 installation can’t find imagick.so file. It is searching /usr/lib/php/20170718/imagick.so but the file is in /usr/lib/php/20200930/. I tried to just copy the file in to /usr/lib/php/20170718 but then i got another error PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php/20170718/imagick.so (/usr/lib/php/20170718/imagick.so: undefined symbol: zend_string_init_interned), /usr/lib/php/20170718/imagick.so.so (/usr/lib/php/20170718/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    imagick: command not found

    did you find any solution to this problem?

Hi. :)
Same issue here. php -i | grep -i imagick result :

/etc/php/8.0/cli/conf.d/20-imagick.ini,
imagick
imagick module => enabled
imagick module version => 3.4.4
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version => ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Imagick using ImageMagick library version => ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
imagick.locale_fix => 0 => 0
imagick.progress_monitor => 0 => 0
imagick.set_single_thread => 1 => 1
imagick.shutdown_sleep_count => 10 => 10
imagick.skip_version_check => 1 => 1

php -m | grep imagick : just “imagick” lighted in red.

What I should do next ? Thanks :)