Please note that Bitnami Stacks are completely self-contained and run independently of the rest of the software or libraries installed on your system. For that reason, it is not possible to upgrade one component of the stack (in this case PHP).
You need to upgrade de full stack and then restore your files. You should launch a new VM with the latest version, and then migrate your data there. This documentation is useful to migrate owncloud:
With the steps above, you would have WP with the latest PHP 7.2 version (7.2.29).
I hope it helps