Hosting platforms often support multiple PHP versions, which are usually compiled simultaneously. This process can be time-consuming. However, you can speed up the process by compiling just one specific PHP version through SSH access in DirectAdmin.
Steps to Compile a Single PHP Version
-
Access DirectAdmin via SSH
Start by logging into your DirectAdmin server using SSH access.
-
Check Available PHP Versions
To find out which PHP versions are available on your server, run the following command:
perlgrep -P 'php[\d]_' /usr/local/directadmin/custombuild/options.conf
This will display a list of all the PHP versions installed.
-
Compile Your Selected PHP Version
Once you know the PHP versions available, choose the one you want to compile (e.g., PHP 7.3). Then, execute the following commands:
bashcd /usr/local/directadmin/custombuild ./build set php1_release 7.3 ./build update ./build php_expert 7.3 php-fpm ./build rewrite_confs
This process will compile only the PHP version specified (in this case, PHP 7.3), saving time and resources.