How to use PHP 8.1 in CyberPanel
You should definitely upgrade to PHP 8.1 if you want to benefit from the latest features, get better error handling, improved RFCs, and optimizations.
Carrying the legacy forward, PHP surprised its enthusiasts with the release of PHP 8.1 in November 2021, ensuring users better performance, better syntax, and improved security. Your latest WordPress , laravel , Symfony, codeigniter, django, node js, react js may need php 8.1 and its packages.
By default older cyberpanel version dose not comes with php 8.1, you will need to install it.
To install php 8.1 & its packages run the command from terminal :
sudo apt install lsphp81*
Now restart Litespeed :
systemctl restart lsws
If you are still problem using php 8.1 in cyberpanel please upgrade the version of your cyberpanel using the following command :
sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)