No, you have to be more careful with this.
My notes are only applicable to a new install on Ubuntu 16.04. If you have a different system, a different PHP version, you need to adapt.
It is possible to have more than one version of PHP installed on a single system, but it is difficult to configure for people who are not used to sysadmin tasks.
So if you plan to upgrade PHP on your current system, if it is a Bitnami installation, you need guidance from Bitnami.