Categories: Development

PHP version select with Directadmin

Choosing and enabling multiple PHP versions with the selector in the Directadmin panel.

Directadmin allows up to 4 active PHP versions to be used and chosen from. The first listed is default and the rest will be options.

Navigate to Directadmin custombuild directory

cd /usr/local/directadmin/custombuild

Update or check for updates to Directadmin

./build update

Now choose the 4 PHP versions you want to use:

./build set php1_release 7.1
./build set php2_release 7.3
./build set php3_release 7.4
./build set php4_release 8.0

I am going to be doing it sequentially for this post, remember the first listed (php1_release) is the default.

If you don’t want 4 options use “no” e.g

./build set php4_release no

Now set the mode as php-fpm

./build set php1_mode php-fpm
./build set php2_mode php-fpm
./build set php3_mode php-fpm
./build set php4_mode php-fpm

Rebuild PHP

./build php n

And the rewrite configurations

./build rewrite_confs

The PHP version select option is enabled by default, to make sure it is enabled:

/usr/local/directadmin/directadmin set php_version_selector 1 restart

Now in modify domains the users have the PHP version selector.

 

Share

Recent Posts

Kennington reservoir drained drone images

A drained and empty Kennington reservoir images from a drone in early July 2024. The…

2 years ago

Merrimu Reservoir drone images

Merrimu Reservoir from drone. Click images to view larger.

2 years ago

Early September spring shots

Some early September spring shots from a bushwalk, It is still too early for wildflowers.

3 years ago

Cloning an NVMe to SK Hynix Platinum P41 NVMe

I recently needed to clone over a smaller NVMe to a 2TB SK Hynix Platinum…

3 years ago

Using Laravel’s deleteDirectory to delete folders and their contents

If you ever needed a simple solution in Laravel to delete an entire directory and…

3 years ago

How to allow only 1 user to register in a Laravel application

How to enforce only one user to register or be registered in a Laravel web…

3 years ago