I got a message from my webhosting company telling me that the support of PHP version 7.2 will end soon, so I need to update to a newer version.
The most logical would be to upgrade to the newest version, which at this moment is 7.4.
My question is, do I need to upgrade to 7.3 first and from there to 7.4. Or can I just simply upgrade to version 7.4 at once? The server is running on Ubuntu 18.04.03 LTC.
Thanks in advance!
12 Answers
You can directly upgrade to PHP 7.4.
PHP versions are separately installed in different directories. Therefore you can also install 7.4 next to 7.2 (if you are running your web hosting yourself, that is).
There are however some compatibility issues between these versions, but in many cases, these do not pose a problem (in my experience). See also:
I hope this answers your question. Otherwise, please let us know.
2A developer called Ondřej Surý maintains packages for PHP which include the latest minor versions - he is awesome.
You can install his repositories for PHP & Apache2:
sudo add-apt-repository ppa:ondrej/php
sudo add-apt-repository ppa:ondrej/apache2Then update your repos & upgrade your packages:
sudo apt update
sudo apt upgradeFinally, remove PHP7.2 from Apache & replace it with PHP7.4:
sudo a2dismod php7.2
sudo a2enmod php7.4Note: you may need to install the 7.4 version of some PHP modules separately, but see how you go.