There are multiple PHP versions that are available on a hosting platform. Usually, users have to compile all these versions at once, which consumes a lot of time. However, it is possible to compile a single PHP version via SSH access of DirectAdmin and save time.
To Compile a Single PHP Version
1. Log in to DirectAdmin via SSH access.
First, you need to know the PHP versions available.
2. Enter the command:
1
|
grep -P 'php[\d]_' /usr/local/directadmin/custombuild/options.conf
|
A list of available PHP versions will appear.
3. Pick a PHP version (in this case, PHP version 7.3) and run this code. (Here the version is using)
1
2
3
4
5
|
cd /usr/local/directadmin/custombuild
./build set php1_release 7.3
./build update
./build php_expert 7.3 php-fpm
./build rewrite_confs
|
With it, DirectAdmin will compile only the single PHP version that you mentioned in the code.