Browse help topics

cPanel Hosting

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.

  • Updated
  • Last reviewed
  • Intermediate
  • About 10 minutes

Applies to: CloudLinux cPanel Blue Arctic Shared Web Hosting (cPanel)

On this page
  1. Which setting to change
  2. 1. Check your current limits
  3. 2. Ask us to raise the limit
  4. Why not edit .user.ini or .htaccess yourself?
  5. How to tell it worked
  6. Troubleshooting
  7. Still need help?

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

SettingWhat it controlsRaise it when
memory_limitMemory one page load can useYou see “Allowed memory size of … bytes exhausted”
upload_max_filesizeLargest single file you can uploadA large image, theme or plugin upload fails
post_max_sizeTotal size of one form submission or uploadKeep it a little larger than upload_max_filesize
max_execution_timeSeconds a script can runImports or backups time out
max_input_varsNumber of fields a form can sendLarge 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:

  1. Go to Tools → Site Health, click Info, and open Server.
  2. 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

  1. Open a support ticket from the Client Portal.
  2. 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 an M (megabytes), as in 128M.
  3. 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.
  4. 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, 128 means 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:

  1. If your site uses WordPress, go back to Tools → Site Health → Info → Server and check that the values have changed.
  2. In WordPress, you can also go to Media → Add Media File and read Maximum upload file size: under the upload box.
  3. 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.php for this.
  • Uploads still fail at the same size: ask us to raise post_max_size too. It must be larger than upload_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.

Was this article helpful?

Report outdated instructions or suggest an improvement
Type of report

Please do not include passwords or personal information.

Still need help?

Our support team can look into your account and walk you through it.