PHP limits control things like the largest file you can upload, how much memory a script can use and how long it can run. You may need to raise them if uploads fail, a large import times out or WordPress reports a memory error. You change them yourself on the Options tab of the PHP Selector.
Change a PHP setting
- Log in to cPanel and go to Software › Select PHP Version.
- Make sure a numbered PHP version is selected, not native; options can't be changed on native (see change your PHP version).
- Open the Options tab.
- Find the setting and choose a new value from its drop-down, or tick or untick it for on/off settings. Changes save automatically.
- Test your site again. Some apps cache these values, so you may need to reload the page or clear the app's cache.
The settings you're most likely to need
| Setting | What it controls |
|---|---|
upload_max_filesize | The largest single file that can be uploaded through your site, such as a media file or plugin zip. |
post_max_size | The total size of a form submission, including all uploaded files. Set it equal to or larger than upload_max_filesize, or big uploads will still fail. |
memory_limit | How much memory one PHP script can use. Raise it if you see "Allowed memory size exhausted" errors. |
max_execution_time | How many seconds a script can run before it's stopped. Raise it for long imports or backups. |
display_errors | Shows PHP errors on the page. Turn it on briefly to debug, then turn it off again: on a live site it can reveal file paths and other details to visitors. |
allow_url_fopen | Lets scripts open remote URLs as if they were files. Some apps need it; leave it off if yours doesn't. |
Good to know
- The values offered in the drop-downs are the ones your plan allows. Your account also has an overall resource allowance, so setting a very high
memory_limitwon't give a script more memory than your plan provides. - Settings are per PHP version. If you switch version, check the Options tab again.
- If you need a value higher than the drop-down offers, open a support ticket and tell us what the app needs.
Getting a memory error in WordPress? See fix "Allowed memory size exhausted" errors.