Step 1: Login to cPanel.
Step 2: Locate ‘Select PHP version’ in Find search area and click on it.
Step 3: Choose your desired PHP version and click on ‘Set as Current’.
Step 4: To set the PHP extensions, Click on ‘Switch to PHP settings’.
Step 5: Click on the extension we wish to change, enter the value and save the settings.