I have a local development site on Ubuntu and currently my system has PHP 7.4 installed and I can see Drupal site using the correct version in terminal using drush st but if I browse to Admin UI and check the PHP version in status page it is showing different version.

In case it helps Initially the site was setup on PHP 7.2 later on PHP version is updated on the system.

drush @local.local st

Drupal version   : 8.9.0                                                 
Site URI         : http://local.d8site.local                            
DB driver        : mysql                                                 
DB hostname      : localhost                                             
DB port          : 3306                                                  
DB username      : drupal                                                
DB name          : d8site_local                                         
Database         : Connected                                             
Drupal bootstrap : Successful                                            
Default theme    : bartik                                                
Admin theme      : seven                                                 
PHP binary       : /usr/bin/php7.4                                       
PHP config       : /etc/php/7.4/cli/php.ini                              
PHP OS           : Linux                                                 
Drush script     : /var/www/local.d8site.local/vendor/drush/drush/drush 
Drush version    : 10.2.2                                                
Drush temp       : /tmp                                                  
Drush configs    : /var/www/local.d8site.local/vendor/drush/drush/drush 
Install profile  : standard                                              
Drupal root      : /var/www/local.d8site.local/web                      
Site path        : sites/local                                           
Files, Public    : sites/local/files                                     
Files, Temp      : /tmp               

php --version
PHP 7.4.9 (cli) (built: Aug  7 2020 14:29:36) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.9, Copyright (c), by Zend Technologies
    with Xdebug v2.9.6, Copyright (c) 2002-2020, by Derick Rethans

Status Message through UI

  • 2
    This is off-topic because it relates to system administration and installing software. It is not necessarily true that the version of software available on the CLI is the same as one run via a web or application server due to any number of reasons.
    – mradcliffe
    Aug 20, 2020 at 12:27

1 Answer 1


You have to configure the web server to use the PHP version you want.

For example:

sudo a2dismod php7.2
sudo a2enmod php7.4

sudo service apache2 restart

Not the answer you're looking for? Browse other questions tagged or ask your own question.