How to create a php.ini file

1. Log in to your cPanel account, go to the Files >> section of the File Manager menu.

For the basic theme of cPanel:

file manager cPanel

2. Navigate to the root directory of the domain, click on New File and create a file called php.ini:

new file cPanel

3. Find the newly created file in the list, right-click and choose Edit:

new file cPanel

4. Add the required PHP configuration and click Save Changes in the upper right corner:

new file cPanel

To verify the current PHP version and configuration, see this article.

If you want to change the values of the PHP configuration (for example, max_execution_time, memory_limit, post_max_size, upload_max_filesize, etc.), you must reset the values in the Select PHP version menu. In this way, it will be possible to overwrite the PHP configuration using php.ini.

Was this answer helpful?

Related Articles

How to install any version of PHP

Install any version of PHP The official CentOS 7 repositories have PHP 5.4 that has reached the...

What is cURL?

cURL (pronounced 'curl') is a software project that provides a library (libcurl) and a command...

cURL & php-curl installation in CentOS 7

We log in with the privileges of the root user and execute the following commands: yum install...

Check the installed PHP version

How can we check the installed PHP version To check the PHP version installed in our web space,...

PHP automatic installation

Automatic installation of different PHP versions This script will allow you to manage different...