WordPress is a free and open-source content management system written in PHP and paired with a MySQL or MariaDB database. Features include a plugin architecture...
Before changing PHP versions, check which versions your website platform, theme and extensions support. Choose a version that still receives security updates and is compatible with your application. Back up your files and database, and check that you can restore them.
If you have a test environment, try the change there first. For your live website, make the change during a quieter period using the settings available with your hosting service. Afterwards, check pages, sign-in, forms and orders. If errors appear, review the application logs and temporarily switch back to the previous version, if it is still available.