How to enable PHP extensions in cPanel (Select PHP Version)

Print
  • 0

PHP extensions add features that some sites need: image processing, international text, ZIP archives, encoded scripts and more. On TopHost hosting you turn them on and off yourself in cPanel, under Software, Select PHP Version, on the Extensions tab. A change applies right away, without a ticket.

Signs that an extension is missing

Usually an error message or the installer's requirements list names it. A few common examples:

Message or requirementExtension to enable
Call to undefined function imagecreatefromjpeg(), thumbnails are not generatedgd (or imagick, if the application asks for it)
"The intl extension is required", wrong date or currency formatsintl
Class 'ZipArchive' not found, plugins or updates do not unpackzip
Class 'SoapClient' not found, a payment or courier module cannot connectsoap
"ionCube Loader is not installed", a file starts with ionCube-encoded textioncube_loader

Enabling an extension step by step

  1. In cPanel, open Software, then Select PHP Version.
  2. Check the version shown next to Current PHP version. If it says native, choose a numbered version first: with the native version the extension list cannot be changed. How to choose a version is explained in changing the PHP version in cPanel.
  3. Open the Extensions tab. The extensions are listed alphabetically.
  4. Tick the box next to the extension you need. It is saved immediately; a short confirmation appears. Untick it to turn the extension off.
  5. Reload the page of your site that showed the error.

If you changed many boxes and want to start over, use the Reset to default button to return to the standard set.

Good to know

  • The list belongs to one PHP version. Each version keeps its own set of extensions. After moving the site to another version, open the Extensions tab again and check that what you need is still ticked.
  • Domains set in MultiPHP Manager are not affected. If a domain has a fixed version there, it uses the server's extensions and ignores this list. Set the domain to inherit in MultiPHP Manager to bring it back.
  • Some extensions depend on others or exclude each other. If a box cannot be ticked, or a message mentions another extension, follow what it says.
  • Enable only what you use. Every extension loads with each PHP process and uses some memory. Leaving unneeded ones on makes the site slightly heavier and gains nothing.

Checking the result

Create a temporary phpinfo() file and look for the extension's name on that page, as described at the end of changing PHP limits in cPanel. Delete the file afterwards. In WordPress you can also look under Tools, Site Health, Info, Server.

The Options tab: PHP limits

Next to Extensions, the Options tab changes values such as memory_limit, upload_max_filesize and max_execution_time. That topic has its own article: changing PHP limits in cPanel. For WordPress memory errors, also see raising WP_MEMORY_LIMIT in WordPress.

The extension is not in the list

Open a ticket stating the extension name, the PHP version and, if you have it, the exact error message. We will tell you whether it can be added.

Related articles

Was this answer helpful?