Subscribe Newsletter

Your Name  : 
Email Address *  : 
  • PNR Enquiry: Google SMS is a good way but besides it you can also check the PNR...
  • ???????: Thanks a lot, I have same problem and think how to solve it all day,...
  • Union Budget 2013-2014: Nice service by Indian Railways.
  • Railway Budget 2013: It is nice service of Google SMS by Indian Railway.
  • wordpress – widgets – plugin 2012: For more information see:...
  • PNR Status: thank you for the info
  • louisg: Thank you Bala Krishna, that’s very nice. Thanks for the SEO plug as...
  • Sandeep Beniwal: Hi, I want to convert video into .flv/.swf using asp.net...
  • Barun Roy Choudhury: Please send me swift code for IOB Santoshpur branch Kolkata...
  • Daniel: Hi, I followed the steps in the article and it gives me an error: Unknown...
  • amarana mohanarao: hello sir iam mohan plz send me STATEBANK OF INDIA [kotturu]...
  • Irina: Hi! Thank you for the article, really nice, but I have some more question...
  • s khaja mynuddin: hello i have forgotten my profile password can i send the filled...
  • Archives

  • Blog Stats

How to edit php.ini in WHM/CPanel

If you are managing server and running multiple websites on server then sure you need to tweak and optimize php setting in php.ini file that works for you. for example, you need to increase max file upload size if you are running a video streaming website or increase memory_limit value due to memory allocation failure in php script. WHM does not allow you to change these values through WHM/Cpanel web interface. All you have to recompile apache with php in order to make critical change in php.ini.

Your first step is to check location of php .ini file. You can do this by running phpinfo function in a temp .php file. Create a file called “info.php” with below content. Upload file on webserver using ftp software and run on server to see server configuration. Find “Loaded Configuration File” in the web page to check exact location of php.ini file. Usually, path of the php.ini file is “/usr/local/lib/php.ini” but if it is different in phpinfo then use that file.

[php]<?php phpinfo(); ?>[/php]

Use PuTTy SSH client to login into server. Now it is the time to make change in php.ini file. You can do it in many ways. If you are familiar with Linux command line then use vi editor or nano editor. Nano editor is much more comfortable then traditional vi editor. Also, nano shows all useful commands in bottom bar that help user to works easily with nano editor.

Another, simple way is to use WinSCP client. WinSCP is a free windows SSH client that allow you to use shell commands or use convenient user friendly ftp like interface. Browse php.ini file using the WinSCP graphical interface, download the file, make the changes and upload again to the server.

Restart apache in order to see the changes.


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

2 Responses to “How to edit php.ini in WHM/CPanel”

  1. I have the same problem. Thanks for this good solutions…

  2. thanks for the solution. :D

Leave a Reply