install php 5.4 in ubuntu 18 code example Example: install php 5.6 on ubuntu 18.04 $ sudo add-apt-repository ppa:ondrej/php