How to enable PHP extensions (imagick, intl, redis and more)
A PHP extension adds a capability to PHP: image processing, international formatting, talking to a cache server. A site health check or install script that says "the intl extension is missing" or "imagick not found" is asking for one. You can switch most of them on yourself.
Turn an extension on
The screen is CloudLinux's PHP Selector on both panels. Only the menu path differs.
- Open it:
- cPanel: Software → Select PHP Version.
- DirectAdmin: Extra Features → Select PHP version.
- Check the current PHP version at the top. If it says native, choose a specific version (for example 8.2) and set it as current. Extensions can only be changed on a selected version. See How to change my PHP version and PHP settings.
- Open the Extensions tab.
- Tick the extension you need. It saves immediately.
- Reload your site.
Untick to turn an extension off the same way. Don't untick things you don't recognise: several are needed for WordPress and most PHP software.
If the extension you need isn't in the list for your chosen PHP version, try a newer version. If it's still missing, open a support ticket with the extension name and PHP version.
Common extensions and what they're for
| Extension | Needed for |
|---|---|
imagick |
Image editing in WordPress (crops, thumbnails). WordPress falls back to gd without it |
gd |
Basic image handling. Keep on |
intl |
Formatting dates, numbers and currencies by locale. Required by many frameworks and WooCommerce |
mbstring |
Multibyte text (accents, emoji). Keep on |
zip |
Installing plugins and themes from zip files, exporting backups |
soap |
Payment gateways and shipping calculators that use SOAP APIs |
bcmath |
Precise decimal maths. Laravel and some payment libraries |
exif |
Reading photo orientation and metadata in uploads |
curl |
Fetching URLs. WordPress updates and API calls. Keep on |
opcache |
Speeds up PHP by caching compiled code. Keep on |
redis / memcached |
Lets PHP talk to a Redis or Memcached server. The extension doesn't include the server; ask support before relying on one |
ioncube_loader / sourceguardian |
Running encoded (licensed) PHP software that requires them |
pdo_mysql / mysqli / mysqlnd |
Database access. Keep on |
Check an extension is loaded
-
In File Manager, create a file in your website folder named
info.phpcontaining:<?php phpinfo(); -
Open
https://yourdomain/info.phpand search the page for the extension name. -
Delete
info.phpwhen done. It exposes server details.
WordPress users can also open Tools → Site Health → Info → Server.
Change PHP settings while you're there
The Options tab on the same screen sets memory_limit, upload_max_filesize, post_max_size and max_execution_time. See How to change my PHP version and PHP settings.
Problems
| Problem | Cause | Fix |
|---|---|---|
| Extensions tab is greyed out | PHP version is native | Select a specific version first |
| Plugin still says the extension is missing | Page cache, or the plugin checks a different PHP (for cron scripts) | Purge caches. Confirm with info.php. For cron, use /usr/local/bin/php |
| Site broke after enabling an extension | Conflict, most often two image or two cache extensions | Untick what you just enabled |
| Need an extension that isn't listed | Not available for that version | Try a newer PHP version, or open a support ticket |
Did this answer it?