Question

Console display PHP v7.3 but Wordpress says v5.6.40?

Posted March 14, 2020 292 views
PHP

My wordpress displayed a warning to upgrade my php. I followed the instuctions from digital ocean and using the console I upgraded from 7.2 to 7.3. My wordpress site still gives me the warning to upgrade my PHP. I installed the plugin Display PHP version and it says- WordPress 5.3.2 running Divi theme. Running PHP version: 5.6.40. How do I correct this?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @michaelp92927f1eef1ba6d626,

Most probably you have multiple PHP versions on your droplet and your website is using it.

WHat I’ll recommend doing in order to confirm this is, SSH to your droplet

ssh root@DropletIp

Go to your website’s DocumentRoot

cd /path/to/website

create an info.php file there like so

touch info.php

As soon as you have created it add the following content

<?php phpinfo();

Save the file and load it in the browser, there you should be able to see the full php PATH of our application. Most probably you are using the default one located

/usr/bin/php

You’ll need to change it to use the newest PHP version you have installed by chaning the path in your vhost configuration file.

Regards,
KDSys

Submit an Answer