Some PHP settings can be adjusted per account on shared hosting; others are fixed for everyone’s security and stability. This guide shows how to check what applies, rather than promising particular values.
The settings people usually want
| Setting | Controls | Typical symptom when too low |
|---|---|---|
memory_limit | Memory one request may use | “Allowed memory size exhausted” |
upload_max_filesize | Largest single uploaded file | Upload rejected |
post_max_size | Largest total form submission | Upload fails silently; must be ≥ upload size |
max_execution_time | Seconds a script may run | “Maximum execution time exceeded” |
max_input_vars | Number of form fields accepted | Menus or settings pages don’t fully save |
Finding out what you can change
- Look in DirectAdmin for a PHP settings or configuration option near the PHP version selector, or search “PHP” in the panel search. If present, it shows which directives your account can edit.
- Try a
.user.inifile. Some server setups read a.user.iniinpublic_html:
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 120
Changes can take a few minutes to apply.
- Confirm the result with a phpinfo file — check the Local Value column. How to check which PHP version your site is using
Server limits are ceilings
If the server caps a value, asking for more has no effect, silently. If your change doesn’t show in phpinfo, that’s why.
Before raising a limit
Ask why it’s being hit. Well-behaved sites rarely need huge limits. A limit reached repeatedly usually points to one plugin or process doing too much at once. “Allowed memory size exhausted” PHP error
Choosing a host for a PHP project? Every Traxio account runs PHP 7.4 to 8.3 with a MySQL database: see PHP and MySQL hosting, free for the first 30 days, then £0.99 a month.