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?

3
  • I see an issue with the theme you try to activate, not with WordPress.
    – cybmeta
    Commented Jun 7, 2018 at 18:35
  • 2
    Are you sure that your site is using 5.6? Just because you installed it doesn't mean your web server is using it, afterall you can have 1 version for CLI and another for WWW, and multiple versions installed in parallel
    – Tom J Nowell
    Commented Jun 7, 2018 at 19:15
  • Yes so CLI is using 5.6 now and web server is still using the older how to make apache2 web server point to newer version? Commented Jun 7, 2018 at 19:21

1 Answer 1

1

The version of PHP used in the cli and your web server can vary depending upon your hosting and/or Apache configuration. Obviously, you are checking the command line interface version.

You can use your cPanel to determine what versions of PHP Apache is using, you can install a PHPinfo type plug that shows the standard phpinfo() output in the WP admin area, or you can create a simple phpinfo() page outside of WordPress.

2
  • 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 Commented Jun 7, 2018 at 18:03
  • Afraid you'll have to work with your hosting provider to get that information. I don't how they have cPannel configured.
    – Steve
    Commented Jun 7, 2018 at 18:04

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