How do I adjust PHP settings with a custom php.ini in DirectAdmin?

Some applications need PHP settings changed, such as more memory, a longer execution time, or a larger upload limit. In DirectAdmin you can adjust these using PHP settings or a custom php.ini file. This guide explains the options.

Common settings you might change #

  • memory_limit: how much memory a script can use.
  • upload_max_filesize and post_max_size: the largest file you can upload.
  • max_execution_time: how long a script may run.
  • max_input_vars: useful for large forms or complex themes.

Option 1: PHP settings in DirectAdmin #

  1. Log in to DirectAdmin.
  2. Open the Select PHP Version or PHP settings area.
  3. Adjust the available options, such as memory limit and upload size.
  4. Save.

Option 2: A custom php.ini #

If a setting is not exposed in the panel, you can create a php.ini file in your site’s folder with the values you need, for example a higher memory_limit. Your PHP version’s handler reads these custom values.

Checking your changes #

Create a PHP info page or use your application’s system report to confirm the new values are active. If a change does not take effect, clear any caching and reload.

Troubleshooting #

  • Change not applied: confirm you edited the settings for the correct PHP version.
  • Site errors after a change: revert the value; the setting may be too high or unsupported.

Need help? #

If you are unsure which PHP value an application needs, our support team can advise over live chat.

What are your feelings