What is php.ini?
The php.ini file and changing PHP Settings
The php.ini file is a special file for PHP. The php.ini file is where you declare changes to your PHP settings. You can use the default settings for the server and change specific settings by using the MultiPHP INI Editor.
The server is already configured with standard settings for PHP, which your site will use by default. Unless you need to change one or more of the settings, there is no need to create or modify a php.ini file. If you would like to make any changes to settings, please do so through the MultiPHP INI Editor.
How To Modify PHP Settings
There may be times where you need to change some of the default PHP settings and below we've outlined those steps, however, keep in mind that on our Shared, Cloud, & Reseller hosting there are PHP Settings That Cannot Be Changed.
Modify PHP Settings with MultiPHP INI Editor :
- Login to cPanel.
- In the Software section, click on the MultiPHP INI Editor icon.
- Under Configure PHP INI basic settings, select the Home Directory or specific domain from the drop-down.
- Under PHP Directive select the new setting for each PHP directive you would like to change.
- Then click Apply at the bottom to save your changes.
Create a php.ini File
This file should be created in your cPanel Home directory (
/home/username/). For VPS Plesk users the file should already exist in the following directory:
Be sure to replace "username" with your actual cPanel user name, and "$DOMAIN" with your actual domain.
How to create a new php.ini file in cPanel:
- Login to cPanel.
- In the Files section, click on the File Manager icon.
- Select the root directory for your site, the default for the primary is public_html.
- Click the New File button at the top of the page.
- In the field called New File Name, enter php.ini, make sure the root directory is in the bottom box, and click Create New File.
- Right-click the php.ini file and select Edit, and then click the Edit Edit button in the bottom corner of the pop-up box.
You can now input the contents of your php.ini file, click Save to save your changes, and then Close to return to the File Manager.