Cloud Service >> Knowledgebase >> How To >> How to Install ImageMagick Extension for a PHP Version from WHM?
submit query

Cut Hosting Costs! Submit Query Today!

How to Install ImageMagick Extension for a PHP Version from WHM?

ImageMagick is a beneficial application for producing, manipulating, composing, and converting bitmap pictures. Integrating it with PHP enables dynamic image editing, an essential feature for many online applications. If you run your server using WHM (Web Host Manager), you can easily install the ImageMagick extension for a specific PHP version. In this article, we'll walk you through the steps individually.

1. Understanding the Importance of ImageMagick

With the installation, the next thing to do is to review why ImageMagick is so important for web applications hosted on a server. ImageMagick is an image manipulation toolkit. It provides command line utilities for dynamically resizing, cropping, rotating, and applying a variety of effects to photos. This functional aspect is useful not only for making thumbnails, for ease of copying of pictures posted by users, but also for making aesthetically attractive information on the spot.

2. Preparing Your Environment

Before installing the ImageMagick extension for PHP, ensure your server fulfills the required specifications. This includes:

  • Access to WHM requires administrative credentials.

  • PHP version installed on your server. WHM usually supports many PHP versions, so select the one you wish to install the ImageMagick extension.

  • A basic grasp of the command line interface (CLI) and server management.

3. Accessing WHM

Log in to your WHM account with your credentials. Once logged in, go to the "Software" area. You'll discover a variety of choices for controlling your server's software installs and customizations.

4. Locating EasyApache 4

WHM's EasyApache 4 software is used to manage Apache and PHP configurations. Locate EasyApache 4 under the "Software" section and click on it to continue.

5. Selecting PHP Version

EasyApache 4 displays a list of available PHP versions. Select the version for which you wish to install the ImageMagick extension. If you're unsure which version your website uses, look it up in the PHP settings or ask your developer.

6. Managing PHP Extensions

After selecting the desired PHP version, you will have choices for managing PHP extensions. Search for "ImageMagick" in the list of available extensions. If ImageMagick does not appear, you may need to activate it first.

7. Enabling ImageMagick

If ImageMagick is not enabled by default, you may turn it on by checking the box next to its name. This step instructs WHM to incorporate the ImageMagick extension when recreating the PHP configuration.

8. Rebuilding PHP Configuration

After activating ImageMagick, rebuild the PHP setup. This step guarantees that the modifications you've made, such as adding the ImageMagick extension, are applied to the PHP version you've selected.

9. Verifying Installation

Once the PHP configuration has been rebuilt, it is critical to ensure that ImageMagick is appropriately installed and enabled for the PHP version selected. You can execute a PHP script using ImageMagick methods or inspect the PHP settings directly.

10. Testing ImageMagick Integration

To see if ImageMagick is correctly integrated with PHP, write a small PHP script that does fundamental image manipulation operations like resizing a picture and adding a filter. Execute this script on your server and monitor the results. ImageMagick works properly if the script runs without issues and gives the anticipated results.

Conclusion

The integration of ImageMagick extension to a particular PHP version within WHM is a simple task, and it improves the web server capacity. As described here, you can install and activate ImageMagick with ease and make your web applications use advanced image processing functions.

Table: PHP Versions Supported by WHM

 

PHP Version

ImageMagick Support

7.4

Yes

8.0

Yes

8.1

Yes

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!