Articles in this section

How to enable or disable PHP extensions in Plesk?

Plesk for Windows kb: how-to Plesk for Linux

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Question

  • How manage PHP extensions for Plesk PHP versions?

Answer

  1. Log into Plesk
  2. Go to Tools & Settings > PHP Settings.
  3. Click on the required PHP handler name, for example, 8.1.20 FPM application:
    Screenshot
  4. Enable or disable the required PHP extension by moving the toggle button near the extension name left or right:
    Screenshot
Enable or disable PHP extensions via CLI for Plesk on Linux
  1. Connect to the server via SSH.

  2. For example, to disable the bcmath extension for PHP 8.1, use the command below:

    # plesk bin php_handler --extension-disable bcmath -id plesk-php81-fpm

    To enable it, use the following command:

    # plesk bin php_handler --extension-enable bcmath -id plesk-php81-fpm

    Note: Set the proper version of the PHP handler and the extension name in the commands above

Was this article helpful?

Comments

3 comments
Date Votes
  • Hi, is there a way to enable these modules via CLI? We had 20+ PHP handlers and multiple servers. It will be time-consuming for us to enable all modules 1 by 1 in all alp-php and in all servers. Thanks

    0
  • Hello Zeald Z,

    Thank you for your question. The article was updated with the CLI solution for Plesk on Linux servers.

    0
  • Currently, I have a playbook that adds ioncube_loader_win_8_2.dll into `C:\Program Files (x86)\Plesk\Additional\PleskPHP81\ext\` and then adds below to php.ini of each PleskPHP* versions (in this example php 8.2):
    zend_extension="C:\Program Files (x86)\Plesk\Additional\PleskPHP81\ext\ioncube_loader_win_8.1.dll"

    However, neither phpinfo or if (extension_loaded('ionCube Loader')) - are showing as ioncube loader is enabled. Note, we have hundreds of Windows Plesk Servers and UI way of installing won't help us. Can you share some information or write an article? 

    Please. 

    0

Please sign in to leave a comment.