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:
-
Log in to your cPanel account.
-
Navigate to the cPanel’s File Manager interface (cPanel » Home » Files » File Manager).
-
Click Settings, select the Show hidden files checkbox, and click Save.
-
Navigate to the target directory.
-
To create a new file, click + File.
-
Enter
.user.ini
Important:You must include the period that precedes the file name. -
Click Create New File.
-
Select the new file in the list of files and click Edit.
-
Enter the PHP directives that you wish to adjust for the directory.
-
Click Save.