Sign Up / Log In
Need help?
1300 210 210
Online Support Web Hosting

Where Is My php.ini File

The php.ini file is one of the essential configuration files in PHP. It serves as the file settings which allows you to control how your PHP works on different scenarios. Scenarios like File Uploads, Display Errors, Log Errors, and more.

So where is your php.ini file located? And what will you do if you don’t see one in your PHP directory? In this guide, you’ll learn the location and how to create a php.ini file so you can start to configure settings for your PHP program.

Where Is My php.Ini File

By default, you can locate your php.ini file at your public_html directory. But for some cases, you don’t see a php.ini file, you can create it manually. Continue reading this article to learn how to create it via your cPanel.

How to Create a php.Ini File

Important: 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.

Step 1. Access your Hosting Manager.
Step 2. On the Home page, click the Files option or the [ v ] arrow symbol on the right side.
file option to access file manager via hosting manager
Step 3. Click the File Manager. Once the File Manager loads, all of the files and folders in your webspace will be displayed.
file manager icon option via hosting manager
Step 4. Select the root directory for your site, the default for the primary is public_html.
Step 5. Click the + File button at the top menu of the page.
file button on the file manager page to create new file in root directory
Step 6. A pop-up window will appear. In the New File Name field, enter php.ini as the file name. And enter /public_html to the New file will be created in the field. Then click the Create New File button.
pop up window to create a php.ini file in root directory
Step 7. Right-click on the file you created and select the Edit option.
Or you can select the php.ini file and click the Edit button at the top menu bar.
highlighted created php.ini file and edit button to edit file
Another window will appear, click the Edit button.
pop up window with information to be directed to text editor page

It will direct you to the Text Editor page. From this point, you can input the configuration settings you want to your php.ini file. Click the Save Changes button, and click the Close button to close the Text Editor page.

Here is a sample of a php.ini file configuration:

sample configuration settings in a php.ini file

You’ve successfully created your php.ini file in your directory. Please let us know if you need any further assistance, or if you have any questions. We’d love to help!

Was this helpful? Yes No 42% of people found this helpful.
we're
online
Need Help? Chat Now