Anyone might have experience this issue before?
On my cPanel the "Select PHP Version" dropdown is showing that 8.1 is selected but when I go to my WordPress dashboard it says "PHP Update Required".
To verify which PHP version exactly is the one that my site is using I added the below code as phpinfo.php and access then checked example.com/phpinfo.php and it shows that I’m on 7.4.
<?php
phpinfo( );
?>
Let me know if you have suggestions on how I could fix this. Thank you all in advance.
I tried changing the PHP version to 8 back to 8.81 but nothing special happened.
>Solution :
If this is for your main site, I recommend that you check your cPanel > File Manager > public_html folder > look for .htaccess file chances are, you have a PHP version specified in your htaccess file that overrides the PHP version set on your cPanel.
You may want to look out for “ea-php74” in your .htaccess and update it to 8.1 to work.
You can also try replacing it by adding this PHP handler at the top of the file .htaccess file:
php – BEGIN cPanel-generated handler, do not edit
Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php81___lsphp .php .php8 .phtml
</IfModule>
php – END cPanel-generated handler, do not edit
Source: WordPress Org
