The format is simple: a setting name, =, then the value; a line starting with a semicolon ; is a comment. The server keeps a main file for each PHP version, and on shared hosting each account can usually override some values for itself without affecting anyone else.
The settings that matter most
| Setting | What it does | Example |
|---|---|---|
memory_limit |
Maximum memory one script may use | 256M |
upload_max_filesize |
Largest single uploaded file | 64M |
post_max_size |
Largest complete POST request | 64M |
max_execution_time |
Maximum run time in seconds | 120 |
max_input_vars |
Number of fields in one form | 3000 |
display_errors |
Show errors on the page | Off on a live site |
Settings that allow bigger uploads in WordPress and fix the upload_max_filesize error:
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 256M
max_execution_time = 120
How to see the current values
Create a temporary info.php containing <?php phpinfo();, open it in the browser, then delete it right away because it reveals server details. Over SSH, php -i | grep memory_limit prints a value and php --ini shows which files PHP loaded.
Common mistakes
- Raising only
upload_max_filesize: ifpost_max_sizestays smaller, the error remains, because the whole request is over the limit. - The change doesn’t show: you may have edited a PHP version your site doesn’t use, or the value is set somewhere else, such as
.htaccessor.user.ini. - A huge memory limit that does nothing: raising
memory_limitcan’t exceed the account’s real limits; fixing the memory-hungry code works better. - Command line differs from the web: SSH commands and cron jobs may read a different configuration file from the one your site uses.
On ArabyHost
ArabyHost hosting plans include PHP 8.1, 8.2 and 8.3. You change the version and values like memory_limit and upload_max_filesize from the PHP tools in cPanel, such as MultiPHP; cPanel opens with one click from the Araby Panel, so there’s no need to hunt for the file. Values remain bound by your account’s own resource limits (LVE). On the Developer plans you can also inspect settings over SSH with php -i. If you hit Allowed memory size exhausted, the Araby AI assistant reads the error log and explains the fix. To pick a version, see choosing a PHP version.
FAQ
I changed upload_max_filesize and nothing happened. Why?
Make sure `post_max_size` is raised to the same value or higher, and that you edited the PHP version your site actually uses. Then confirm the new value with `phpinfo()`.
Can I set memory_limit really high?
You can write it, but PHP still can't use more memory than your account actually has. If a site constantly needs a lot of memory, find the plugin or query that consumes it.
What's the difference between php.ini and .user.ini?
php.ini is the main file for a PHP version; `.user.ini` is a small file you place inside a site folder to override some values for that folder only, where the server supports it.