0 items
24/7 Support & Sales   1300 210 210
Online Support Web Hosting

I don't have a php.ini file

In running website applications that require PHP, you will need a php.ini file. This is the default configuration used to control variables such as file timeouts, resource limits, and upload sizes.

Note: There are standard PHP settings already set in the server, which your site uses by default. If you do not need to make any modifications to one or more of these settings, you do not need to create or change a php.ini file.

Below is a sample php.ini configuration:

php.ini code

By default, the php.ini file is located at public_html/php.ini. If you do not see a file named php.ini in your public_html folder, you may create one using the following steps:

  1. Click on My Account at the top of this page.
  2. Select Hosting Manager from the drop-down menu.
  3. Enter your username and password and click Log In.
  4. On the Home page, click the Files icon or the [ v ] arrow symbol on the right side, then click the File Manager button.
  5. Open your Web Root and ensure that the Show Hidden Files option is ticked.
  6. Navigate to the file that contains your scripts (if you wish to apply rules to all scripts stay in public_html) and click New File in the top menu.
  7. Enter the file name php.ini and click Create New File.
  8. Right-click on the file that you just created and click Edit.
  9. Click Edit again in the dialog box.
  10. Make the desired changes and click Save Changes.

Congratulations, you have just created a php.ini file.

Additional Info:
It is important to note that the php.ini file only works for scripts that are in the same folder as the php.ini file. If you want to load it recursively in all of your subfolders, add the following line of code to your .htaccess file in the folder where you want to apply it (replace "username" with your cPanel username and assuming that your php.ini file is in public_html):

  • SuPHP_ConfigPath /home/username/public_html/php.ini

If you want to know what .htaccess file is, click here.

If you want to know how to show .htaccess (hidden files) with the File Manager, click here.

Was this helpful? Yes No 60% of people found this helpful.