How to Enable PHP Extensions in cPanel & DirectAdmin
This guide shows you how to enable PHP extensions (modules) using CloudLinux. Missing PHP extensions can cause website errors, broken functionality, or failed applications such as WordPress plugins.
What Are PHP Extensions?
PHP extensions are additional modules that add functionality to PHP. Many websites and applications require specific extensions to work properly.
ionCube Loader
Required for encoded PHP applications.
GD / Imagick
Used for image processing and thumbnails.
mysqli / PDO
Required for database connections.
curl
Enables external API and HTTP requests.
Recommended PHP Extensions for WordPress
WordPress requires certain PHP extensions to function correctly. Missing these can cause errors, slow performance, or broken features in themes and plugins.
mysqli
Required for WordPress to connect to your database.
curl
Allows WordPress to communicate with external services and APIs.
json
Used for data handling and REST API functionality.
mbstring
Handles multi-byte strings for better text processing.
zip
Required for installing plugins and themes from ZIP files.
gd or imagick
Used for image processing, thumbnails, and media uploads.
openssl
Enables secure HTTPS connections.
fileinfo
Helps detect file types for uploads.
Optional but recommended: ionCube Loader (for some premium plugins), OPcache (for performance), and intl (for internationalisation support).
Step-by-Step
Enable PHP Extensions in cPanel
Step 1: Open Select PHP Version
Go to Software → Select PHP Version in cPanel.
Step 2: Choose PHP Version
Select your required PHP version from the dropdown.
Step 3: Enable Extensions
Tick the extensions you need (e.g. ionCube, mysqli, curl).
Step 4: Save Changes
Click Save to apply changes.
Enable PHP Extensions in DirectAdmin
Step 1: Open Select PHP Version
Go to Account Manager → Select PHP Version.
Step 2: Choose PHP Version
Select your active PHP version.
Step 3: Enable Extensions
Tick required extensions from the list.
Step 4: Save
Click Save to apply changes.
Common Issues & Fixes
Extension Not Available
Try switching PHP version or contact support.
Changes Not Applied
Clear cache or restart PHP processes.
Site Still Broken
Check error logs to identify missing modules.