Skip to content

PHP Settings in cPanel

In cPanel, you can change selected PHP settings for your website.

This may be necessary, for example, when:

  • you cannot upload a larger file,
  • a data import fails,
  • WordPress reports that the memory limit is too low,
  • a script times out too quickly,
  • a form contains many fields,
  • a developer asks you to change a specific PHP parameter.

1. Where to change PHP settings

After logging in to cPanel, find the:

Software

section.

Then click:

MultiPHP INI Editor


2. Select a domain

Select the domain for which you want to change PHP settings.

Example:

domena.pl

If you have several domains on the hosting account, make sure you select the correct one.


3. Basic Mode

The easiest option is to use:

Basic Mode

Here you can change the most commonly used PHP parameters without manually editing the configuration.

After changing a value, click:

Apply


4. Most commonly changed parameters

memory_limit

Defines the maximum amount of RAM a single PHP script can use.

Example:

256M

or:

512M

If the application reports an error such as:

Allowed memory size exhausted

you may need to increase this parameter.


upload_max_filesize

Defines the maximum size of a single file uploaded through PHP.

Example:

64M

means approximately 64 MB per file.

If you try to upload a file larger than the configured value, the upload may fail.


post_max_size

Defines the maximum total size of data sent to the website using the POST method.

Example:

128M

This parameter should be at least as large as:

upload_max_filesize

For example:

upload_max_filesize = 64M
post_max_size = 128M

is a valid configuration.


max_execution_time

Defines the maximum execution time of a PHP script in seconds.

Example:

300

means:

300 seconds = 5 minutes

You may need to increase this value for:

  • data imports,
  • exports,
  • updates,
  • other long-running operations.

max_input_time

Defines the maximum amount of time PHP may spend processing input data.

Example:

300

In most cases, you do not need to change this value unless the application requires it.


max_input_vars

Defines the maximum number of variables that can be submitted to PHP.

Example:

3000

or:

5000

This setting may be relevant for:

  • complex forms,
  • large WordPress menus,
  • configuration panels with many fields.

If some form settings are not saved correctly, this limit may be the cause.


5. Example settings

For a typical website or WordPress installation, you may encounter values such as:

memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 128M
max_execution_time = 300
max_input_time = 300
max_input_vars = 3000

This is only an example.

It does not mean that every website should use exactly these values.


6. Editor Mode

MultiPHP INI Editor may also provide:

Editor Mode

This allows you to edit the PHP configuration manually.

Example:

memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 128M

If you are not sure what you are doing, it is better to use:

Basic Mode

Incorrect manual settings may cause problems with the website.


7. After changing the settings

After saving the changes:

  1. open the website,
  2. repeat the action that previously caused the problem,
  3. check whether everything works correctly.

Example:

If you previously could not upload a 50 MB file and increased:

upload_max_filesize

try uploading the file again.


8. Higher values are not always better

Do not set very high values without a reason.

For example:

memory_limit = 4096M

does not automatically make the website faster.

Very high limits may allow a faulty script to consume too many server resources.

Increase parameters only when the application actually requires it.


9. Simplest procedure

To change a PHP parameter:

  1. Log in to cPanel.
  2. Go to:

Software → MultiPHP INI Editor

  1. Select the domain.
  2. Stay in Basic Mode.
  3. Change the required parameter.
  4. Click Apply.
  5. Check the website.

Done.

If you do not know what value to use, contact the website administrator, developer, or Cloud4You technical support.