1.Log in to your
cPanel hosting panel.

2.Scroll down navigate to
SOFTWARE -> Select PHP version.
3.Select "Current PHP version", this will open a dropdown box.

4.Select the version you want. Please note that if your WordPress installation is not updated or if your plugins do not support the newer version, this may
cause errors or even crash your website.