Skip to content
Advertisement

how i can disable php 8 and enable php7.4 in arch linux

when I run the command php -v I have version 8.0 I would like to change the version to 7.4 despite I have installed php7.4 but I don’t know how to switch between the two versions

thank you

Advertisement

Answer

Let’s assume that the location of php7.4 is /usr/bin/php7.4, in which case

/usr/bin/php7.4 -v

will yield something like this:

enter image description here

hence, you can use this method for whatever command that you would like to execute:

/usr/bin/php7.4 <yourcommand>

You can disable PHP 8 via

sudo a2dismod php8.0

if it bothers you. You can do so temporarily as well.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement