Why does the latest Ubuntu comes with an obsolete PHP Version? Is it secure to use this version?

put on hold as primarily opinion-based by Ramhound, Kamil Maciorowski, Scott, fixer1234, music2myear 2 days ago

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What version are you referring to, and why do you say it's obsolete? – var firstName Jan 11 at 21:31
  • Ubuntu 16.04. comes with php7.0 which is end of life php.net/supported-versions.php edit: 16.04 not 18.04. – Franken Jan 11 at 21:32
  • 1
    @Franken - I assume by your comment it means you are running Ubuntu 16.04 instead of Ubuntu 18.04, if that is not the case, you really should edit your question and provide the relevant information necessary to answer your question. – Ramhound Jan 11 at 21:47
  • 1
    "Latest" is very misleading then. – Kamil Maciorowski Jan 11 at 21:49
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. – Ramhound Jan 11 at 21:53

Why does the latest Ubuntu comes with an obsolete PHP Version?

You indicated you are using 16.04, at the time 16.04 was released, PHP 7 in Active Support.

Is it secure to use this version?

You should be using PHP 7.1 or later.

You can upgrade your PHP installation to 7.3 by running the following commands:

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update
$ sudo apt-get install -y php7.3

Source: How To Install PHP (7.3, 7.2 & 7.0) on Ubuntu 18.04 & 16.04 via PPA


  • Ubuntu 16.04 is still Support. Why is 7.1 not in the repository. – Franken Jan 11 at 21:47
  • 2
    @Franken - Except your question did not ask the reason PHP 7.1 is not in the repository. You asked the reason, Ubuntu 16.04 comes with PHP 7.0 when PHP 7.0 reached its End of Life data. The answer to your repository question is simple, you need to use the correct repository, in order to upgrade PHP 7.0 to a supported version of PHP. The default for 16.04 is 7.0, you can upgrade that to 7.x if you so desire. 18.04 default is 7.2, you can upgrade that to 7.x if you so desire. – Ramhound Jan 11 at 21:51

Ubuntu 18.04 was released in April of 2018. This means it had what could have arguably been fairly reasonable to have PHP7.0 which only stopped recieving Active Support in December of 2017.

Also, Ubuntu is an OS primarily designed for developers or engineers, not to be used for hosting public websites.

At the time, PHP7.0 was not end of life. Any release of PHP holds security risk.

It's intrinsic that when you open your device up with more and more features and services, it is more vulnerable to attacks.

EDIT: OP originally said they were using 18.04. Revised to say 16.04. Even so, upon release of 16.04, PHP7.0 was still in active support. The latest Ubuntu is 18.04 (Bionic Beaver).

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