How can I upgrade PHP on my deprecated distro?
I'm trying to upgrade my version of PHP, but my distro has already reached its EOL. Is it still possible to upgrade?
2 Replies
Great question. While it is possible to find resources that address upgrading a service on a deprecated distribution version, the best practice here would be to upgrade or migrate to the latest supported version of your distribution first.
We have a very helpful guide that details How to Upgrade to the Latest Distribution via Clean Install, and I encourage you to check that out.
Performing a clean installation is the upgrade path we recommend because it allows you to skip directly to the newest distro release and avoids many issues that seem to come with inline upgrades.
Please note, it is always a good idea to back up any important data stored on your Linode! Although we don’t anticipate any problems, backing up your data is a best practice that we strongly stand behind! Our guide discusses the different options for creating back ups, or you can follow the steps in this guide for copying your disk via ssh to your local machine.
Once you have completed a clean installation of the latest distro, you can then perform updates and upgrades on any of the services running on your distribution, including not only PHP, but Ruby, MySQL, PostgreSQL, etc.
To upgrade to the most recent version of PHP, as you mentioned, you can follow the steps in this other Community Questions site post.
Hope this helps!
You can always build PHP from source:
https://thephp.website/en/issue/how-to-compile-php/
This approach will certainly lead to much forced loss of hair if you can't use sudo and/or haven't downloaded the right tools first…or your out-of-date kernel/libc don't support the system calls PHP requires…
-- sw