How to change the PHP runtime configuration from WHM?

The PHP is configured with the default values of runtime variables in our Shared Linux Hosting and on VPS/Dedicated servers as well. If you need to change the default values, you will need to modify the php.ini file in the server.

 

Linux VPS/Dedicated Server Hosting


You can modify the PHP runtime configuration by editing php.ini file from WHM.

  1. Login to WHM with root user.
  2. Go to Home » Service Configuration » PHP Configuration Editor.
  3. Select the Advanced Mode.

    PHP Configuration Editor in WHM

  4. Make your desired changes in PHP configuration and Save the changes.

    PHP Configuration Editor


If you want to make changes for a single cPanel account, copy php.ini file under cpanel-user/public_html directory, make desired changes and save the php.ini file.

Linux Shared Hosting


We do have CloudLinux OS with LiteSpeed webserver on our SSD powered Linux Shared environment. In this environment, we do not offer a custom php.ini for the individual cPanel accounts. If you wish, you can change the PHP runtime configuration from the cPanel account. Here are the steps.

  1. Login to the cPanel.
  2. Click on Select PHP Version from Select Software and Services section.



  3. If you are using native version of PHP, change it to the other version and click on Set as current.

     

  4. Click on Switch to the PHP Settings.

    Switch to PHP Settings

  5. Click on the PHP variable value, you will get a drop down box with the different values. Select the appropriate value for the PHP variable and click on Apply

    Select Values

  6. Click on Save button to save the changes.

    Select PHP Version

Related Articles

How to set the cron job to run a PHP script in cPanel?

This article will help how to setup cron job for a PHP file in cPanel What is Cron? Cron is a...

How to enable PHP error reporting in cPanel?

Please refer to the following article to enable PHP error reporting in cPanel Login to your...

How to assign a Dedicated IP to cPanel?

In WHM/cPanel, you can’t modify an individual website IP Address but you can change the IP...

How to Disable AutoSSL Email Notifications in cPanel?

cPanel provides a free AutoSSL certificate which has the complete automation process. cPanel...

How to change bandwidth limit of cPanel account from WHM?

Please refer to the following steps to change the cPanel account bandwidth limit from WHM. Log...

  • 0 Users Found This Useful

Was this answer helpful?