Changing PHP settings

If you require specific PHP configuration settings then you may be able to configure them through the control panel.

To do this log into the DirectAdmin control panel at yourdomain.com/config

Under the Advanced Features heading click on Select PHP Version

To configure custom settings you must be using a different PHP installation than our native one. This can still be the same version of PHP as our native installation. Select the PHP version that you require from the menu, do not select native, and click Set as current.

After changing to a PHP version other than native click on the Show PHP Settings button. Change the settings you need and then click save.
Note that even though this button displays when the native PHP version is chosen, it will not work unless you have set a specific version.

Note that the PHP version is set for your entire user account, it is not possible to set the PHP version per domain. If you have multiple websites requiring different versions of PHP then you will need to either purchase separate accounts for each site or purchase a reseller plan. Reseller plans contain multiple user accounts.

If the PHP option that you need to set is not available to configure through the control panel then you will need to do this through a .htaccess file. This method also allows you to configure different PHP settings per website.

Create a file named .htaccess inside your public_html folder.

Place the following code inside it:

php_value setting_name setting_value

Example:

php_value upload_max_filesize 10M





Was this answer helpful?

 Print this Article

Also Read

How to use the Direct Admin control panel

Help with the Direct Admin control panel is available by clicking the help link from within...

Changing your PHP version

If you require a specific version of PHP you can change the PHP version used by your account.To...

Changing your PHP version

If you require a specific version of PHP you can change the PHP version used by your account.To...

I've lost my Direct Admin password

If you have forgotten your Direct Admin password you may create a new password by following...

How to log into the DirectAdmin control panel

Using the DirectAdmin control panel you can create and manage your email accounts, email...

Powered by WHMCompleteSolution