1

I have a Ubuntu Apache2 server where I have updated PHP to 7.3.

I can see from /etc/php/ PHP-versions from 5.6. to 7.3. installed.

php -r "phpinfo();" | grep php.ini

Confirms me that the latest version is being used.

However, a Wordpress -website running on the server, is still using the old PHP 7.0. How can I configure Wordpress to use the new version instead? I haven't found the php path defined in any of the wordpress files.

1
  • 1
    You can't "configure WordPress" to use the new version. WordPress has nothing to do with that. You need to update your webserver's configuration so that it uses PHP 7.3 instead. Commented May 14, 2019 at 13:40

1 Answer 1

1

After updating the php to version 7.3, you should enable that mode in apache configuration.

Run this command:

sudo a2enmod php7.3
Sign up to request clarification or add additional context in comments.

1 Comment

That was already enabled, but wordpress was still running the old version. However after your a2enmod php7.3: I ran "sudo update-alternatives --set php /usr/bin/php7.3", whereafter restart apache finally did the trick for WP as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.