php

How to Customize PHP Directives

Last modified: February 21, 2024


Overview

The PHP .user.ini file allows you to customize PHP directives on a per-directory basis.

System requirements

  • You must use PHP version 5.3.0 or higher.

  • You cannot use the DSO PHP handler.

Configuration requirements

We recommend that you review the .user.ini PHP documentation before you implement any configuration changes.

User ini file setup

To set up a user.ini file, perform the following steps:

  1. Log in to your cPanel account.

  2. Navigate to the cPanel’s File Manager interface (cPanel » Home » Files » File Manager).

  3. Click Settings, select the Show hidden files checkbox, and click Save.

  4. Navigate to the target directory.

  5. To create a new file, click + File.

  6. Enter .user.ini

    Important:
    You must include the period that precedes the file name.

  7. Click Create New File.

  8. Select the new file in the list of files and click Edit.

  9. Enter the PHP directives that you wish to adjust for the directory.

  10. Click Save.

Additional Documentation