How do I update my Linode's PHP version?

I currently am running a Wordpress site off a Linode that I set up a while ago with the Debian 10 image. I am trying to update it's PHP version but keep running into conflicts.

Here is the article I am following Click here

When I ran

sudo apt-get update

I received this error:

Err:5 http://ppa.launchpad.net/ondrej/php/ubuntu lunar Release 404 Not Found

Then it mentions something about not having a Release file, and how updating from a repository can't be done securely so it is disabled by default.

Running

sudo apt-get install php7.4

afterwards results in it saying it can't locate the package.

1 Reply

As that post mentions in the last comment:

If you want 8.1 on 22.04, you'll have to use a PPA.
Aside from it discussing installation on an Ubuntu Linode, the point is that the PPA (Personal Package Archive) needs to be present on the server to install the new version of PHP.

Here's the part of any responsible post about updating versions of any service you rely on: please make sure you back up your Linode before you make any changes. The Linode Backup Service is a great option for this - we invoice hourly for the service, so you can add the service, run a Snapshot, run the update, verify things are working, and then remove the service. It's likely that it will cost pennies for a solid backup plan should the installation go south. But more important, any backup is better than none when something goes wrong unexpectedly.

OK, that said, I found some helpful guides online that are specific to Debian and PHP 8+:

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct