I updated PHP but Wordpress doesn't recognize it

  • Posted on April 3, 2020
  • PHP
  • rem3nAsked by rem3n

I get this by typing php -v:

PHP 7.4.4 (cli) (built: Mar 20 2020 13:47:17) ( NTS ) Copyright © The PHP Group Zend Engine v3.4.0, Copyright © Zend Technologies with Zend OPcache v7.4.4, Copyright ©, by Zend Technologies

Wordpress says:

Your site is running an older version of PHP (

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Where is the vhost configuration file located? I’ll look into this but it looks a bit complicated to me. Could you say what exactly I need to do to fix this.

Hi @rem3n,

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

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


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