I can't change the PHP version

In cyberpanel I change the php version to 8.1 and do a reboot. But when I log in via ssh and output php -v it still shows me version 7.4

-bash-4.2$ php  -v
PHP 7.4.33 (cli) (built: Nov  8 2022 15:16:44) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with the ionCube PHP Loader + ionCube24 v12.0.5, Copyright (c) 2002-2022, by ionCube Ltd.
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
    with Xdebug v2.9.0, Copyright (c) 2002-2019, by Derick Rethans

What are you doing, you know?
You have posted screenshot of php config and checking php pversion in terminal.

Add following in .bashrc or .bashrc_profile

alias php=‘/usr/local/lsws/lsphp82/bin/php’

Logout ssh are re-login then check version

1 Like

if you are changing php for site follow

click list websites->manage->change PHP

To change server PHP follow this guide

1 Like