How to install PHP 8.2 in CyberPanel

CyberPanel may not come with PHP 8.2 preinstalled. This can cause some distress, especially when dependencies use PHP version 8.2.

This guide will look at how to install this PHP version.

When you try to edit PHP configs for this version, you may see this error:

This shows that the config file for this version is not available.

We will first update our CyberPanel. Access your server using the SSH terminal as root and run 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)

After upgrading, we will install PHP 8.2. For Ubuntu OS, run this command:

apt-get install lsphp82*

For CentOS/Alma/Rocky:

dnf install lsphp82*

After installing, restart the server.

service lsws reload

Check where the PHP 8.2 configs are available.

Now PHP 8.2 has been installed on our server.

Was this article helpful?

Related Articles

Leave A Comment?