The following are the commands I ran in order to upgrade PHP version from 7.2 to 7.3 for a laravel project.
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php;
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y php7.3;
# Instantly php version changes
# For a Laravel Project
sudo apt-get install php7.3-zip;
sudo apt-get install php7.3-gd;
sudo apt-get install php7.3-xml;
sudo apt-get install php7.3-curl;
sudo apt install php7.3-mysql;
# do this too - https://stackoverflow.com/a/35240511/6275860
# Restart is not needed but we should still do it to see all is well.
sudo service apache2 restart;
# We are good to test now the websites.
The process should be same for the other upgrades as well such as: 7.0 to 7.4, 7.2 to 7.4 etc.