Set custom PHP settings with .user.ini in Plesk
- 20.02.2026 00:58
-
- hosting
- php
- plesk
On GARMTECH hosting you can change many PHP limits in Plesk (upload size, memory, execution time). Sometimes you need to override other PHP directives for a specific website or folder.
For most cases, we recommend using Plesk → PHP Settings. If you need a folder-specific override, you can use a .user.ini file.
Option A (recommended): change settings in Plesk
- Open Plesk from My.GARMTECH (Services → My Services → your hosting plan → Login to Plesk).
- Go to Websites & Domains → your domain → PHP Settings.
- Adjust the available values and click OK.
This applies to the whole domain.
Option B: use .user.ini (per directory)
.user.ini is a small configuration file that PHP reads in the directory of the executed script and parent directories up to the document root (PHP-FPM/FastCGI). This allows you to apply settings only where needed (for example, only inside /wp-admin).
1) Create the .user.ini file
- In Plesk, open Files for your domain.
- Navigate to the directory where you want the override (most often
httpdocs). - Create a file named:
.user.ini
2) Add directives
Example:
memory_limit = 256M
max_execution_time = 180
max_input_vars = 5000
display_errors = Off
Important: not every PHP directive can be changed this way. Only directives allowed for user/per-directory mode will work.
3) Wait a few minutes
PHP caches .user.ini values. If you do not see changes immediately, wait a few minutes and test again.
How to confirm the active value
If you are unsure whether the directive is applied, create a small phpinfo.php file in the same folder and open it in a browser:
<?php
phpinfo();
Then search for the directive name. After testing, delete this file (it reveals server details).
Troubleshooting
- No effect: double-check the filename is exactly
.user.iniand it is placed in the correct directory. - Conflicting values: a value set in Plesk PHP Settings can override your expected behavior. Keep settings in one place when possible.
- Need a server-wide change: on shared hosting, some limits can only be adjusted on the server level. In this case, open a support ticket in My.GARMTECH with the domain and the exact directive you need.