Articles on: cPanel

How do I set the PHP version, extensions and options in cPanel?

To change the current PHP version used by your website:


Log into your cPanel account.
In the Software section, click on Select PHP Version.
On the PHP Selector page, you will see the current PHP version.
Click the dropdown next to the Current PHP Version.
Select the PHP version you want to use from the list (e.g., PHP 7.4, PHP 8.2).
Click Set as current to apply the changes.

This will change the default PHP version for your account. Make sure that your website and applications are compatible with the PHP version you are switching to.

To enable or disable specific PHP extensions:


Log into your cPanel account.
In the Software section, click on Select PHP Version.
On the PHP Selector page, you’ll see a list of PHP extensions below the version selector.
Check the boxes next to the extensions you want to enable, or uncheck the boxes next to the extensions you want to disable.
Once you’re done selecting the extensions, the changes are saved automatically.

To adjust PHP options like maximum file upload size, execution time, and more:


Log into your cPanel account.
In the Software section, click on Select PHP Version.
Once on the PHP Selector page, click on the Options tab at the top.
You’ll see a list of PHP options with their current values. Some common options include:

upload_max_filesize: Sets the maximum size for uploaded files.
post_max_size: Maximum size of POST data (includes file uploads).
max_execution_time: Time limit in seconds before a script is terminated.
memory_limit: Maximum memory allocated for PHP scripts.

Click on the values next to each option to change them as needed.
The changes are saved automatically once you modify the values. |

Updated on: 25/10/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!