Hi All. I have been trying to upgrade to PHP8 but keep failing. I tried the following command and various more from the internet but nothing helped.
Below command was issued:
sudo apt-get install software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php8.1
But the application keep on responding with such:
E: Unable to locate package php8.0 E: Couldn’t find any package by glob ‘php8.0’ E: Couldn’t find any package by regex ‘php8.0’
Below are my OS details (VPS):
NAME=“Ubuntu” VERSION=“16.04.7 LTS (Xenial Xerus)” ID=ubuntu ID_LIKE=debian PRETTY_NAME=“Ubuntu 16.04.7 LTS” VERSION_ID=“16.04” HOME_URL=“http://www.ubuntu.com/” SUPPORT_URL=“http://help.ubuntu.com/” BUG_REPORT_URL=“http://bugs.launchpad.net/ubuntu/” VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial
If I am required to upgrade my VPS, can someone guide me to do so? I am not used to develoment stuff and I have WordPress on my VPS. So how can I upgrade (if required) without losing all those stuff there?
Thank you in advance.
Regards, Jasveer
This textbox defaults to using Markdown to format your 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.
Hello @jasveer
As with almost any upgrade between major releases of an operating system, this process carries an inherent risk of failure, data loss, or broken software configuration. Comprehensive backups and extensive testing are strongly advised.
To avoid these problems, we recommend migrating to a fresh Ubuntu 22.04 server rather than upgrading in-place. You may still need to review differences in software configuration when upgrading, but the core system will likely have greater stability. You can follow our series on how to migrate to a new Linux server to learn how to migrate between servers.
https://www.digitalocean.com/community/tutorial_series/how-to-migrate-to-a-new-linux-server
Regards
Hey @jasveer,
I can see you have an Ubuntu 16.04, that’s a really really really old one and it has been EOF a long time ago. You’ll need to upgrade it as soon as possible.
To do so, you can follow these steps:
remove unused packages and files
Upgrade commands
Of course, before you run that, I’ll suggest creating a snapshot just to be safe in case something fails:
https://docs.digitalocean.com/products/images/snapshots/
As for enabling PHP 8, usually the following works for updated systems :
then enabling the repo
and lastly, instaling php 8: