User Tools

Site Tools


How To Recompile Only a Single Version Of PHP With DirectAdmin's CustomBuild

Let's say that you have 4 versions of PHP installed, and you only want to update the default PHP version, or php1_release. You know that if you do, recompiling all versions of PHP is going to take a while, so you may be deterred to update because of this. In the following example, we have 4 versions of PHP, and only want to update php1_release from version 7.2 to version 7.3:

  php1_release 7.2
  php2_release 7.1
  php3_release 7.0
  php4_release 5.6

You can check the PHP versions and handlers installed using the following command:

  grep -P 'php[\d]_' /usr/local/directadmin/custombuild/options.conf

You can use php_expert to compile only a single version and save yourself some time.

Use this command like so (provided the PHP version is using PHP-FPM):

  cd /usr/local/directadmin/custombuild
  ./build set php1_release 7.3
  ./build update
  ./build php_expert 7.3 php-fpm
  ./build rewrite_confs

And viola! Using the php_expert build option is ideal for busy system administrators eager to save time and provide quicker resolutions for their clients.

control-panels/directadmin/recompile-only-single-version-of-php.txt · Last modified: 2020/06/01 10:25 by Karson N.