User Tools

Site Tools


How to Customize PHP On DirectAdmin

To customize PHP.INI files for DA servers, there are many, many methods. The one method that works for nearly all handlers and webservers is to configure the php [PATH] or [HOST] sections.

Create a uniquely named .ini file in the directory below, where XX is equal to the PHP version you are using:


For example:

  cat /usr/local/php73/lib/php.conf.d/
  post_max_size = 128M

Then restart the webserver.

For OLS:

  /usr/local/lsws/bin/lswsctrl restart

This method works for all webservers. Load the phpinfo page for the site to confirm that the value has been changed.

If you were curious about the varying methods, see the links below:

1) Setup a per-user php.ini to allow open_basedir with suPhp

2) I want per-domain or per-path settings for php

3) Per-Domain php.ini settings - start point

4) per-User php.ini settings in php-fpm

5) per-path php settings, controllable by the User

6) Swapping between php versions when using suPHP and CLI with custombuild

7) Where is my php.ini?

control-panels/directadmin/how-to-customize-php-on-directadmin.txt · Last modified: 2020/06/01 11:22 by Karson N.