Amirol Zolkifli

CyberPanel – How to Change PHP CLI Version

By default, CyberPanel version 2.0.2 installed PHP 7.1.x for the PHP CLI version.

To change the PHP CLI version, SSH to your server and enter the following command:

cp /usr/local/lsws/lsphp74/bin/php /usr/bin/

Change the “lsphp74” to the PHP version you desired (make sure the desired PHP version is available on the server).

Hope this helps.

P.S – The process above was done on CentOS 8 and CyberPanel version 2.0.2.

P.P.S – The latest PHP CLI version (7.4) was needed because I was working on Laravel 8 project. The composer was not working due to some of the Laravel Packages and Laravel 8 itself require a minimum of PHP 7.2.5 version.

    Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    © Copyright 2010 - 2024 Amirol Zolkifli. All Rights Reserved.