Your site is running an insecure version of PHP (7.2.24-0ubuntu0.18.04.7), which should be updated.

my WordPress dashboard was showing notification update PHP version 7.4. and current time my WordPress is running 7.3. please help how to update php version.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @Dev19,

Upgrade PHP to 7.4

The first important thing to know is that you won’t be actually upgrading the PHP version but installing the newest one as well.

You’ll need to add the proper repositories

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update

Next depending on your WebService - Nginx/Apache you have different steps.

Let’s start with the Nginx requirements:

sudo apt install php7.4-fpm

To check this afterwards run

php-fpm7.4 -v

Now if you are using Apache :

sudo apt install php7.4

Now that you have the PHP version, you’ll need to install some extensions. You can do it like so

sudo apt install php7.34-extension_name

The most common extensions can be installed with the following command

sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y

That’s it.

Regards, KDSys