After you install your WordPress, and if you face an error like this, and if you can’t crop new image for your header on your dashboard,
/var/www# php -v
PHP Warning: PHP Startup: Unable to load dynamic library ‘imagick.so’ (tried: /usr/lib/php/20240924/imagick.so (/usr/lib/php/20240924/imagick.so: undefined symbol: php_strtolower), /usr/lib/php/20240924/imagick.so.so (/usr/lib/php/20240924/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.4.0RC3 (cli) (built: Oct 30 2024 11:34:47) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.0RC3, Copyright (c) Zend Technologies
with Zend OPcache v8.4.0RC3, Copyright (c), by Zend Technologies
==========================
use following command
php –ini
Check for GD in php.ini
- Edit the PHP-FPM
php.ini
File: Open the mainphp.ini
for PHP-FPM: - Look for
extension=gd
: Use the search function (usuallyCTRL + W
innano
) to locate any lines that mentionextension=gd
. - Comment Out Duplicate Entry: If you find
extension=gd
inphp.ini
, comment it out by adding a semicolon (;
) in front of it: php.ini - Save and Exit: Save the file and exit the editor.
- Restart PHP-FPM: Restart PHP-FPM to apply the change: