How to install Imagick PHP extension (From WHM interface)
Effortless Imagick Installation: A WHM Guide for cPanel Users
Imagick, a powerful PHP extension, equips your web server with advanced image processing capabilities. If your server utilizes cPanel and WHM (Web Host Manager), installing Imagick is a breeze, thanks to the integrated EasyApache 4 tool. This guide provides a step-by-step walkthrough of how to install the Imagick PHP extension through the WHM interface, eliminating the need for command-line interaction and simplifying the process for cPanel users.
Why Install Imagick?
Imagick empowers you to manipulate images directly within your PHP applications, offering a wide range of benefits:
- Versatile Image Manipulation: Perform various image editing tasks, including resizing, cropping, rotating, adding watermarks, and applying filters.
- Website Performance Optimization: Optimize images for web use, reducing file sizes and improving page loading speeds.
- Enhanced Visual Appeal: Create visually engaging images and dynamic graphics to enhance user experience.
- Streamlined Workflow: Integrate image processing seamlessly into your PHP applications.
Prerequisites
Before you begin, ensure you have the following:
- WHM Access: You’ll need access to your server’s WHM (Web Host Manager) interface.
- Root or Administrative Privileges: You’ll need appropriate permissions to modify server settings and install PHP extensions.
Installing Imagick via EasyApache 4
Step 1: Access WHM and EasyApache 4
- Log in to WHM: Open your web browser and navigate to your WHM login page. This is typically accessed via
https://your-server-IP:2087
orhttps://your-domain.com:2087
, replacing the placeholder with your server’s IP address or domain name. - Search for EasyApache 4: In the WHM search bar, type “EasyApache” and select the “EasyApache 4” option.
Step 2: Customize Your PHP Profile
- Select a Profile: Choose the profile you want to modify. If you haven’t created a custom profile, you can start with the default profile.
- Click “Customize”: Click the “Customize” button next to the selected profile.
Step 3: Navigate to PHP Extensions
- Select “Apache Modules”: In the customization menu, click on “Apache Modules.”
- Choose “PHP Extensions”: Click the “PHP Extensions” tab to access the list of available PHP extensions.
Step 4: Enable Imagick
- Search for Imagick: Use the search bar to find the “imagick” or “Imagick” extension.
- Enable the Extension: Check the box next to “imagick” to enable it for your chosen PHP version.
Step 5: Save and Build Profile
- Review Changes: Scroll to the bottom of the page and click “Review” to confirm your selections.
- Save and Build: If everything looks correct, click “Save and Build” to initiate the profile build process. This may take a few minutes to complete.
Step 6: Restart Apache
Once the build process is finished, you’ll be prompted to restart Apache. Click the “Restart Apache” button to apply the changes and activate the Imagick extension.
Verifying Imagick Installation
-
Create
info.php
: Create a PHP file namedinfo.php
in your website’s root directory with the following content:<?php phpinfo(); ?>
-
Access
info.php
: Open a web browser and visityour-domain.com/info.php
(replaceyour-domain.com
with your actual domain name). -
Search for Imagick: On the PHP info page, use your browser’s “Find” function (Ctrl+F or Cmd+F) to search for “imagick.” If the installation was successful, you’ll see a section with details about the Imagick extension.
MyGlobalHost: Simplifying Server Management
While EasyApache 4 simplifies Imagick installation, managing server configurations can still be daunting for some users. MyGlobalHost offers server management services to handle these tasks for you, ensuring your server is optimized and secure.
Choose MyGlobalHost for hassle-free server management and reliable web hosting solutions.