Here we will cover how to check if ImageMagick is installed on your server.
ImageMagick is pre-installed on all servers for use via the command line. Various commands are included that can be performed to test that ImageMagick is successfully installed.
The PHP extension, Imagick, can be installed on VPS and dedicated platforms.
If you are encountering the common WordPress recommendation to install Imagick that says, "The optional module, imagick, is not installed, or has been disabled", the Install Imagick PHP Extension guide can be used to install the module on VPS or dedicated servers. If you are on a shared server and you'd like to have Imagick installed because of this WordPress message, it can usually be safely disregarded, as ImageMagick performs many of the same functions.
Related Articles
Install Imagick PHP Extension
Create phpinfo Page
Checking for ImageMagick
TIP: Imagick can be installed as a PHP extension on VPS and Dedicated platforms and must be run from the command line as none of the APIs are installed.
- ImageMagick is installed and available on all servers and can be accessed at:
/usr/bin/convert
/usr/bin/mogrify
- Test ImageMagick to ensure it is working properly
- Log into cPanel
- Open File Manager, located in the Files section
- Navigate to the public_html folder
- Upload any jpg image to the public_html folder
- Rename the uploaded image to image.jpg
- Run one of the test commands listed below to confirm ImageMagick is installed and functioning
NOTE: If you have a file named image.jpg in your public_html directory, any of the following commands will resize the image and name the new image resize_image.jpg.
REPLACE: userna5 with the appropriate cPanel username in the commands below.- If using ImageMagick on a server with ssh access:
convert image.jpg -resize 64x64 resize_image.jpg
- If using ImageMagick without ssh access, a cron job can be set up with the following command:
/usr/bin/convert public_html/image.jpg -resize 64x64 public_html/resize_image.jpg
- If using ImageMagick without ssh access, a PHP script can be set up with the following command:
exec('/usr/bin/convert /home/userna5/public_html/image.jpg -resize 64x64 /home/userna5/public_html/resize_image.jpg');
- If using ImageMagick on a server with ssh access:
- After running one of the commands above, refresh the File Manager page
- Check to ensure that the resize_image.jpg file now exists
Comments
0 comments
Article is closed for comments.