How to Increase PHP Limits (memory_limit, upload_max_filesize)
Upload too big, or a “memory size exhausted” error? Check your current PHP limits in WordPress Site Health. Then open a support ticket with the setting (such as memory_limit or upload_max_filesize) and the value you need. The highest values are set by the server.
Applies to: CloudLinux cPanel Blue Arctic Shared Web Hosting (cPanel)
On this page
PHP is the software that runs WordPress and most other websites on your hosting. Its settings limit what your site can do, such as how much memory one page can use or how large an uploaded file can be. If you see “Allowed memory size of … bytes exhausted”, “… exceeds the maximum upload size for this site” or “The uploaded file exceeds the upload_max_filesize directive in php.ini”, the matching limit needs to go up. Check your current value, then ask us for the new one.
Note
This guide is for Shared Web Hosting. On Managed WordPress Hosting, open a support ticket with the setting and value you need.
Which setting to change
| Setting | What it controls | Raise it when |
|---|---|---|
memory_limit | Memory one page load can use | You see “Allowed memory size of … bytes exhausted” |
upload_max_filesize | Largest single file you can upload | A large image, theme or plugin upload fails |
post_max_size | Total size of one form submission or upload | Keep it a little larger than upload_max_filesize |
max_execution_time | Seconds a script can run | Imports or backups time out |
max_input_vars | Number of fields a form can send | Large menus or settings pages don’t save fully |
Tip
Raise a limit a little at a time, then test again. Very high limits can hide a faulty plugin and use up your account’s resources faster. The highest values on offer are set by the server.
1. Check your current limits
If your site uses WordPress:
- Go to Tools → Site Health, click Info, and open Server.
- Write down PHP memory limit, Upload max filesize and PHP post max size. The other two settings in the table are the rows PHP time limit and PHP max input variables. If you also see PHP memory limit (only for admin screens), ignore that row. WordPress raises it for its own admin pages.
If your site doesn’t use WordPress, or you can’t get into your WordPress dashboard, copy the full error message instead and go to section 2.
2. Ask us to raise the limit
- Open a support ticket from the Client Portal.
- Give your domain, the setting (for example
memory_limit), the value it has now and the exact value you need. A plugin’s instructions usually say what it needs. For memory and file sizes, write the number with anM(megabytes), as in128M. - Don’t know what value to ask for? The memory error shows the limit you have now, in bytes: 134217728 bytes is 128M, and 268435456 is 256M. Tell us that number and what you were doing. For an upload, tell us the size of the file.
- Say what needs it, such as the upload or import that failed.
If your cPanel has a MultiPHP INI Editor or Select PHP Version tool (type its name in cPanel’s search box, Ctrl+K or Cmd+K), you can raise the setting yourself instead. Write down the old value first.
- MultiPHP INI Editor: on the Basic Mode tab, choose your domain in the Configure PHP INI basic settings menu. Don’t choose Home Directory, which changes every site. Find the setting, type the new value and click Apply. Always type the
M: without it,128means 128 bytes, which can stop your site loading. - Select PHP Version: open its PHP options and set the new value there. This can apply to every site on your account.
Then check your limits again (section 1). If the value hasn’t changed, put the old value back and open a support ticket.
Why not edit .user.ini or .htaccess yourself?
Blue Arctic’s shared servers run the LiteSpeed web server. LiteSpeed doesn’t recommend .user.ini files, so a file you make yourself may be ignored. Use a cPanel tool from section 2 if you have one, or ask us for the change.
Warning
Don’t add PHP lines to .htaccess yourself. One mistake in that file can take your whole site offline.
How to tell it worked
When we’ve made the change:
- If your site uses WordPress, go back to Tools → Site Health → Info → Server and check that the values have changed.
- In WordPress, you can also go to Media → Add Media File and read Maximum upload file size: under the upload box.
- Try the upload or task that failed before.
Troubleshooting
- The new value doesn’t show: wait a minute, then reload. Check that you’re looking at the right site. If it still shows the old value, reply to your ticket. Don’t edit
wp-config.phpfor this. - Uploads still fail at the same size: ask us to raise
post_max_sizetoo. It must be larger thanupload_max_filesize. - Your site shows an error right after a change: reply to your ticket straight away. If you changed the value yourself, set it back to what it was, then check that you typed the
M. - The value you need is higher than we can set: explain in your ticket what needs it.
Still need help?
Open a support ticket from the Client Portal at my.bluearctic.com (see our support page). Include your domain, the setting and value you need, the full error message, a screenshot and what you already tried. Never include your password.