• I have a Ubuntu 18.04 server. I run apache2 with 4 WordPress websites. Currently, WordPress says I have PHP 7.2. I installed PHP 8 an hour ago. After that, I ran update and upgrade. It appeared to tie to PHP 8. I rebooted the Ubuntu server. WordPress still shows the old version on PHP. I have checked 2 of my website. The same error on both:

    Your site is running an insecure version of PHP (7.2.34-21+ubuntu18.04.1+deb.sury.org+1), which should be updated.

    What have I missed?

    • This topic was modified 3 years, 10 months ago by Gregory Wood.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Yui

    (@fierevere)

    永子

    Refer to your OS distribution documentation on how to switch default PHP version for site (or globally)

    Thread Starter Gregory Wood

    (@farsightvds)

    That may be the issue. After installing php 8.0, I looked at /etc/php. I have 7.2, 7.3 and 7.4. But WordPress shows 7.2. Hmmmm. I have been searching for answers under Ubuntu, Apache2 and WordPress. No luck yet.

    Thread Starter Gregory Wood

    (@farsightvds)

    No one may be interested but here is the answer. We are using Ubuntu 18.04 and apache2 with multiple website on the once computer. Our system requires ‘sudo’.

    `Command to install php 8.0:
    1. sudo apt-apt-repository ppa:ondrej/php
    2. sudo apt update
    3. sudo apt upgrade
    4. sudo apt php8.0
    5. sudo apt update
    6. sudo apt upgrade

    Switch from php 7.2 to php 8.0
    1. sudo a2dismod php7.2
    2. sudo a2enmod php8.0
    3. sudo systemctl apache2 restart

    Please close the ticket.

    This actually helped me just a few minutes after you posted it haha!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP8 installed but not being used by WordPress’ is closed to new replies.