To create a php.ini file do the following:
Create a php.ini file via cPanel
- Log in to your cPanel control panel.
- Under the “Files” section click file “File Manager“.
- In the left pane, find and the click on the directory you want to create the php.ini file in e.g. in this case the “public_html” folder.
- On the top click the “+File” link > type in the name for the new file, in this case “php.ini” (excluding quotation marks) then “Create New File“.
And that’s it, your php.ini file has been created. To add/edit items to the file right click on the php.ini file and click “Edit” > “Edit” then enter your content and click “Save Changes”.
Create a php.ini file via FTP
- Using an FTP client like FileZilla, login to your hosting account.
- Select the directory you’d like to create the new php.ini file in, right-click and select “Create New File” > type in the name of your file e.g. php.ini and click “OK“.
Your new php.ini file has been created, you can now download the file via FTP to edit it and then re-upload the file.