Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Changed PHP version to 8.1 but WordPress thinks we're using version 7.4 instead?

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".

Screenshot of WordPress notice asking the user to update PHP

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading