PHP Configuration Plugin
If you ever encounter problems with the way your server handles PHP packages, it may be helpful to view and/or modify your server's PHP configuration. Depending on the server that you are on, you will have either the PHP Selector or MultiPHP Manager plugin in the cPanel, which is used to modify which version your website utilizes.
Update PHP Version for a Site
PHP Selector allows users on Shared and Reseller servers to easily enable a specific PHP version for a site without having to manually add a handler to the .htaccess file. To update the PHP version for a site:
- Log into cPanel.
- In the Software section, click on the PHP Selector icon.
- Navigate to the directory for which you'd like to update the PHP version. The document root for the primary site on your account is typically located in the public_html folder, so you would select this folder in the file tree.
- Then, from the drop-down menu, select the version of PHP you want to use and then click Update.
Caution: If your site's scripts rely on older functions of PHP, which are no longer available in the latest stable version being used on the server, you may encounter compatibility issues when PHP Cur is automatically updated.
When using PHP Selector, updates are applied recursively. This means any update you apply to a directory will also apply to all sub-directories unless you apply a different directive to one of those subdirectories. Therefore, to use a different PHP version for an addon domain, you would need to navigate to the document root for the addon domain and select the appropriate version of PHP.
- In the cPanel, select the MultiPHP Manager in the Software section.
- Select the domain you want to update by checking the box to the left of it.
- On the right-hand side, choose the version of PHP you need for your site and click Apply.
- There will be a pop up in the upper right corner, letting you know the change was successful.