Overview: Different websites require different PHP environments. Some need specific extensions (like mbstring or imagick), while others require a specific handler for better performance. On your VPS, EasyApache 4 is the tool that lets you customize these settings globally.
Steps to Configure PHP Extensions:
Log in to WHM as root.
Search for "EasyApache 4" in the sidebar.
Click on the "Customize" button next to "Currently Installed Packages".
PHP Versions: Select the versions you want to keep (e.g., PHP 7.4, 8.1, 8.2).
PHP Extensions: Search for the specific extension your script needs and toggle the switch to Install.
Review: Click the "Review" tab to see all changes.
Provision: Click "Provision" to apply the changes. This may take a few minutes as the server recompiles the settings.
Pro Tip: If you want to change the PHP version for a specific website rather than the whole server, use the "MultiPHP Manager" tool in WHM. This allows each cPanel account to have its own independent PHP version.