PHP shows up as plain text after upgrade to 18.04
This is what got my installation sorted
sudo apt install php7.2 php7.2-common php7.2-cli
sudo a2enmod php7.2
Actually, in addition to the commands in this answer, you need
sudo apt install libapache2-mod-php
as well. Somehow it has disappeared!