How to fix when cPanel reflects wrong PHP version

If cPanel is reflecting the wrong PHP version in cPanel –> Server Information

Use the steps below to fix the issue.

rm -f /etc/apache2/conf.d/php.version
/scripts/findphpversion
cat /etc/apache2/conf.d/php.version

8.1

After running these commands, you should restart the Apache web server to ensure that the changes take effect:

/scripts/restartsrv_apache

Note that depending on your cPanel installation and configuration, there may be additional steps required to ensure that the correct PHP version is being used by all services on the server.… Read the rest