Manage PHP and PHP settings in cPanel
Posted on October 21st, 2017
PHP is a widely-used open source server wide scripting language which is mainly suitable for web development and can be embedded into HTML language. On a Webhosting field, different PHP settings need to be changed to host a website without any issue. Every changes needs at php.ini which is the PHP configuration file. Some CMS websites need different PHP extensions to work properly and some PHP extensions like OPcache is used to enhance the website performance. And also some time you need to tweaks some PHP settings like upload size, post size, memory limit, the execution time for the proper working of the Websites and its admin areas. You can easily do all this via our cPanel “Select PHP Version” under the “Software” section.
Before discussing that, you can also see the current PHP settings via PHP info page. You can easily create a phpinfo page via cPanel File Manager. To create phpinfo page follow below steps
-> Go to FileManager on cPanel and navigate to the directory and create a new file named “phpinfo.php” and open the file for edit and add below code and save the file.
<?php phpinfo(); ?>
Let’s discuss how we can change the PHP settings via cPanel easily:
1) Login to your cPanel and choose “Select PHP Version” under the “Software” section.
Look for the ‘Current PHP version’. If it is native, please change it to some other version. You could keep the version same without the native option.
2) In the current page, you will see many options to enable PHP extensions. You can easily enable/disable the PHP extensions by click on the square next to the extension name and “Save” at the bottom.
If you need to edit the PHP settings like upload size, post size, memory limit, execution time, click on “Switch To PHP Options”, It will redirect to another page.
After making the changes click on “Save” to complete the process.
If you need any further help please contact our support department.
This is not current anymore. “Select PHP Version” no longer appears as a link in the “Software” section of cPanel.
Hi, If you are using InterServer web hosting, you can follow this guide. If you are using some other web hosting, the structure in cPanel might be different.
Greetings!
My cpanel current version is ” native(7.2). Can I change it to 7.3 or 7.4 without any effect on a forum I already installed on the puplic html folder?
Thanks in advance
Hello kashada,
Hope you are doing good.
Once the version is updated we need to check how the website is functioning. If the php version is not compatible then errors will occur. If you are on our shared hosting we can recommend cloudlinux php.
Hi, I`m using Joomla.
I update to php 8.2, and Joomla says :
Error
We have detected that your server is using PHP 7.2.34 which is obsolete and no longer receives official security updates by its developers. The Joomla! Project recommends upgrading your site to PHP 8.0 or later which will receive security updates at least until 2023-11-26. Please ask your host to make PHP 8.0 or a later version the default version for your site. If your host is already PHP 8.0 ready please enable PHP 8.0 on your site’s root and ‘administrator’ directories – typically you can do this yourself through a tool in your hosting control panel, but it’s best to ask your host if you are unsure.
Any help on how to enable it ?
Thanks
Hi Pol,
Can you please send an email to [email protected] so we can do a detailed review.