Changing PHP version not working on latest 2.1.2 update

It seems that PHP version is changing for me, kindly show me vhost conf after changing php version

Changed from 8.1.2 down to 7.0 on my subdomain
From the sub domain it self.

docRoot                   /home/
vhDomain                  $VH_NAME
vhAliases                 www.$VH_NAME
enableGzip                1
enableIpGeo               1

index  {
  useServer               0
  indexFiles              index.php, index.html

errorlog $VH_ROOT/logs/ {
  useServer               0
  logLevel                WARN
  rollingSize             10M

accesslog $VH_ROOT/logs/ {
  useServer               0
  logFormat               "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i""
  logHeaders              5
  rollingSize             10M
  keepDays                10  
  compressArchive         1

phpIniOverride  {


module cache {
 storagePath /usr/local/lsws/cachedata/$VH_NAME

errorpage 403 {
  url                     403.html

errorpage 404 {
  url                     404.html

errorpage 500 {
  url                     500.html

scripthandler  {
  add                     lsapi:newst12763115 php

extprocessor newst12763115 {
  type                    lsapi
  address                 UDS://tmp/lshttpd/newst12763115.sock
  maxConns                10
  env                     LSAPI_CHILDREN=10
  initTimeout             60
  retryTimeout            0
  persistConn             1
  pcKeepAliveTimeout      1
  respBuffer              0
  autoStart               1
  path                    /usr/local/lsws/lsphp81/bin/lsphp
  extUser                 newst1276
  extGroup                newst1276
  memSoftLimit            2047M
  memHardLimit            2047M
  procSoftLimit           400
  procHardLimit           500

rewrite  {
  enable                  1
  autoLoadHtaccess        1

context /.well-known/acme-challenge {
  location                /usr/local/lsws/Example/html/.well-known/acme-challenge
  allowBrowse             1

  rewrite  {

  addDefaultCharset       off

  phpIniOverride  {


vhssl  {
  keyFile                 /etc/letsencrypt/live/
  certFile                /etc/letsencrypt/live/
  certChain               1
  sslProtocol             24
  enableECDHE             1
  renegProtection         1
  sslSessionCache         1
  enableSpdy              15
  enableStapling           1
  ocspRespMaxAge           86400

For subdomain I will check and let you know

Have you found any issues with it?

Hi @usmannasir
I faced with this in last version that you updatet last night , I don’t know if related to the permissions or it’s old
Just want to know is it possible that subdomain use the other version of php ?

There was an issue but it was resolved 1-2 months back.

It wasn’t resolved, at least it isn’t in the latest stable now.

up to 2.3.1 latest version

then change the php to 8.0
reboot server

let me know

this is not a solution
but we are trying helping you out step by step

I tried. Updated cyberpanel last night but still unable to change php version.
What can I try next? I am doing a website migration but the export plugin doesn ot support this php version. Both add-on domain and main domain do not change since I updated cyberpanel 2 weeks ago

[EDIT] I have changed Vhost php version and now it worked

1 Like

This saved me yeah. @Hulst88
You are right, editing the Vhost individually works!

But changing it using any of the two options CP provides does not work for 8.0 or up.
It works for 7.4 sometimes.

And yes you would then also need to go into Edit PHP configuration to restart PHP.
Perhaps that should change, when you change PHP, it should restart PHP (At least for that vhost)

Here are the options that don’t work.

Option 1:

Option 2:

actually i have already post about this procedure
and request if developer can put 1 line to auto restart php after changed success

If you know the line and place, i can make a pull.

i dont know :frowning:

here the link about my post :frowning: Prevent 404 error after add website - #2 by shoaibkk

maybe already put on developer roadmap

I checked GitHub and found only 7.3 in the apachevhosts.

Not sure how related that is.

cyberpanel/ at v2.3.2-dev · usmannasir/cyberpanel (

yeah… somewhere… at here… diemrw or someone talk about every config is using 7.3

Did you guys find a way to change the PHP version on subdomains? @usmannasir

I just found the solution (workaround).

Change the version in vHost Conf:
Choose one:
path /usr/local/lsws/lsphp72/bin/lsphp
path /usr/local/lsws/lsphp73/bin/lsphp
path /usr/local/lsws/lsphp74/bin/lsphp
path /usr/local/lsws/lsphp80/bin/lsphp
path /usr/local/lsws/lsphp81/bin/lsphp


Go to Change PHP and change the version in the one you choose in vHost Conf.
And click Change PHP

It’s not nice, but it works as a workaround! Hope they will fix this!

1 Like


Changing the PHP from the domain or subdomain does not change the Vhost file at all.
The only solution is to do what @phpfigureout said over, where you replace the line with the working one, then save and check again.

Also, there’s a problem with Php 8.1, it just loads blank.
8.0 works fine.

I’m having this problem too, vhost config of the domain looks good but wordpress is showing old php.