Beyond WordPress.
THE GENERAL APPROACH
Check the application's requirements page.
It states the PHP version and extensions needed.
COMMON REQUIREMENTS
A minimum PHP version Specific extensions Memory and execution time for installation
FOR INSTALLERS
Many applications check requirements during installation and report what is missing.
Read that output rather than proceeding past it.
FOR FRAMEWORKS
Modern frameworks frequently expect the web root to point at a subdirectory.
Serving the project root exposes configuration files.
Set the document root correctly in cPanel.
FOR APPLICATIONS NEEDING COMMAND-LINE TOOLS
Some expect tools not available on shared hosting.
Check before committing to an application.
IF AN EXTENSION IS NOT AVAILABLE
Open a ticket and ask.
IF THE APPLICATION NEEDS AN OLD PHP VERSION
That application is unmaintained. Consider whether to use it at all.