How can I downgrade or use PHP 7.2 without uninstalling PHP 7.4? Is it possible to use PHP 7.2 as default instead of the latest version?

pauxplorer picture pauxplorer · Jan 17, 2020 · Viewed 8.9k times · Source

I am using linux Ubuntu 18.04 And I wanna revert back to the previous version of PHP.

I've seen tutorials that requires me to uninstall the latest version, now I am asking if there is a workaround in this problem such that I can easily switch from using 7.2 or 7.4.

Answer

Hadisur rahman picture Hadisur rahman · Aug 15, 2020

I have faced the same problem and Here is the solution:

sudo update-alternatives --config php

Now select which version U want on right now, thanks