How to install PHP 5.6, PHP 8.0 and PHP 8.1 on Ubuntu 22.04 LTS

This article describes step-by-step how to install PHP versions 5.6, 8.0, and 8.1 on your Ubuntu. After installing the two versions, it also explains how you can disable one version and enable another version as the default version for the system. We have run the commands and procedures mentioned in this article on an Ubuntu 22.04 LTS system. The same commands will work on the old Ubuntu 20.04 LTS version as well.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis