How to edit php.ini settings

Modifying the directives in the php.ini file allows you to regulate how scripts and applications written in PHP language can use system resources.

On all our web hosting you can change the PHP version and edit the php.ini file using cPanel.

Warning: If you are using PHP selector to change your PHP version, you need to edit the php.ini from its graphic interface

What is php.ini file

Php.ini is a configuration file that, through some directives, allows you to manage important variables for the functioning of applications written in PHP.

Through this file it is possible to edit some configuration parameters, such as the file loading size and the resource limits.

When you use a CMS, such as WordPress, sometimes themes and plugins need to some values to be edited.

How php.ini file works

Initialization files, with .ini extension, have a very intuitive structure. Insert a new directive in the php.ini file is simple, just follow this syntax.

Directive = value

The symbol “;” inserted at the beginning of a string represents a comment. Comments are completely ignored.

Edit php.ini with cPanel

In order to create and edit your php.ini file, you will first need to login to cPanel.

Scroll down to the “Software” section and select “MultiPHP INI Editor“.

Multiphp Ini Editor

You can choose to use the basic mode or choose the editor mode, which allows you to manually enter directives.

Select “Basic mode” and choose the path where you want to save the new configuration.

Multiphp Ini Editor Select A Location

By selecting “Home directory” the changes in the php.ini file will take effect on all websites associated with the account.

Once you choose the path, you will see some directives that you can modify.

Configure Php Ini Basic Settings

After changing the values according to your needs, press “Apply” to save the changes.

Configure Php.Ini Basic Settings Apply

If everything went well, you will see a success message at the end of the modification.

Successfully Applied Settings Php Ini

Directives list

To manage all the parameters of the php.ini file you can also use the “Editor mode”.

Php Ini Editor Mode

Below are only some of the directives present among the configurable settings of cPanel, but you can add more by consulting the complete list of php.ini directives.


Modifying this value, you’ll change the size of RAM available to execute operations.


This parameter indicates the maximum size for POST requests.


Allows you to define the maximum size of files you can upload to the server.


It allows to manage the maximum number of input variables.


This parameter allows you to set the maximum time limit in which a php script can be executed.


Allows you to enable gzip compression, giving your users faster loading times for resources.


Is used to display php errors and warnings. Useful in case you have display or operating problems with your website.

Create and edit php.ini file from File Manager

You can access and edit php.ini files on your web space using a file manager or via FTP protocol.

In order to create a new php.ini file, login to cPanel and scroll down to the “File Manager” section.

Cpanel File Manager

At this point, locate the path where you want to create your file and press the “File” button on the top bar.

File Manager Add New File

As a file name, enter “php.ini” and click on “Create new file“.

Create Php.Ini File

Now select the file you just created and right click on it. From the drop-down menu that opens, select “Edit“.

Edit Php Ini File

A confirmation window will appear, select “Edit” again to begin editing the file.

Editing Php Ini File

Within the file, you will be able to enter the various directives. Once you have completed the changes, click on “Save Changes” to make the changes.

Save Changes Php Ini File

Try one of our hosting plans for free and without obligation for 14 days. No payment information required!