Changing PHP settings Print

  • 6

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

Click on the Select PHP Version icon

Select the PHP version that you require from the menu, and make sure that all of the PHP modules you require are ticked, then click Set as current.

After changing to a PHP version click on the Show PHP Settings button. Change the settings you need and then click save.

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?

« Back