In your cPanel control panel you can manage the PHP settings for your website, including the PHP version, PHP extensions, and custom PHP variables like
Almost all PHP settings can be managed via the cPanel control panel, without the need to manually create a
php.ini configuration file.
Please follow these steps to enable a PHP version, PHP extension or custom PHP variable:
1) Log in to the cPanel control panel for your website/account.
You can find out how you can enter cPanel here: Accessing your hosting control panel (cPanel)
2) Navigate to the Software menu and choose "Select PHP Version".
Clients with their own dedicated/cloud server may have a "MultiPHP" option instead.
3) On this page, you can select a PHP version.
Currently 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 and 8.1 are available from the dropdown menu. Version 8.2 should be available soon. After selecting your required version, click 'Set as current'.
Note - The 'native' (default) version was set to PHP 7.4 in Dec 2021. It was previously PHP 7.3 from Dec 2019 onwards. We plan to switch to PHP 8.0 as the 'native' (default) version soon.
PHP 5.6 was decommissioned in Aug 2021 and PHP 7.x will be decommissioned in Dec 2022 onwards (see here).
4) Set the PHP extensions.
Please click on the button 'Reset to default' and this will populate the most popular PHP extensions.
You can select any other PHP extensions from the list as required by your website software, but the default ones work for most websites.
If for some reason you find no PHP extensions are selected, this will cause an error on your website. For example WordPress will give an error: "Your PHP installation appears to be missing the MySQL extension which is required by WordPress". The "reset to default" button should fix this.
5) If your website requires custom PHP variables, you can set them here.
Please click on the 'Options' tab along the top.
You'll see lots of PHP variables that you can customise for your cPanel hosting account. Here you can set upload_max_filesize, post_max_size, max_input_vars, memory_limit, allow_url_fopen and many others.
If there is a PHP variable that isn't on the list and you'd like to see it there, please contact our support team and request it.
6) You may need to repair the MySQL database.
Different PHP versions work in conjunction with different MySQL database drivers. If your website is displaying a 404 error or content is missing, please repair the MySQL database. Repairing the database will only take a moment, does not require technical knowledge and won't harm your website in any way.
Please go back to the main control panel and choose the "MySQL Databases" page. On this page there is an option "Repair Database" and a dropdown list of all databases. Please select the relevant database and click the button "Repair Database".
If your website has multiple databases or you don't know which database is which, you can safely go through the list and repair them one by one. There is no risk in repairing a database.
7) All changes take effect instantly, so please test your website to make sure its working.
If you encounter any issues, please revert back to the old PHP settings, then contact our support team for assistance.
Updated by SP on 26/01/2023