Question
How to enable/disable PHP extensions in Plesk?
Answer
-
Log into Plesk
. -
Go to
Tools & Settings > PHP Settings
. -
Click on the required PHP handler, for example,
8.1.20 FPM application
:
-
Enable/disable the required PHP extension by clicking on the corresponding toggle near the extension name:
CLI solution for Plesk on Linux
-
Connect to the server via
SSH
. -
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:
# 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