0

I am running PHP Version 5.6 on my Ubuntu 14.04 Server.

/home/ubuntu# php -v
PHP 5.6.36-1+ubuntu14.04.1+deb.sury.org+1 (cli) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

But when I am activating a theme I am getting below error

Your server's PHP version (5.5.9-1ubuntu4.24) is not supported.

This version is old, insecure and slow. Please update it as soon as possible.

Any insights why this is happening?

  • WordPress itself works with PHP 5.2+, but that doesn't mean themes/plugins have to do so. Chances are the particular theme you're using wants to use certain PHP features only available in 5.6 or 7.x. Your PHP CLI version may not be the same one on the webserver. Check the output of phpinfo() on a .php file in the browser. – ceejayoz Jun 7 '18 at 17:59
  • Yes but my server has version 5.6 still I am getting the error message – error2007s Jun 7 '18 at 18:00
  • Sorry, I submitted the comment too fast. See my edit. – ceejayoz Jun 7 '18 at 18:00
  • Yes the PHP.ini file that loaded has version PHP Version 5.5.9-1ubuntu4.24 how do I change this so that correct php.ini file will load for version 5.6 – error2007s Jun 7 '18 at 18:02
  • Well, it's not so much the php.ini as your webserver setup. If you're using Apache, you probably need to update your libapache2-mod-php5 package. – ceejayoz Jun 7 '18 at 18:10

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.