Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  DirectAdmin  >  How to Compile a Single PHP Version from DirectAdmin?
Top Scroll

How to Compile a Single PHP Version from DirectAdmin?

 2 min

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:

  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)

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.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
New Year Savings
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.