Browse help topics

cPanel Hosting

How to Increase PHP Limits (memory_limit, upload_max_filesize)

Check your current PHP limits in WordPress Site Health, then open a support ticket with the setting (such as memory_limit, upload_max_filesize or post_max_size) and the exact 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 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. 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, copy the full error message instead.

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 or error message usually says what it needs. For memory and file sizes, write the number with an M (megabytes), as in 128M.
  3. Say what needs it, such as the upload or import that failed.

If your cPanel has a Select PHP Version or MultiPHP INI Editor tool (type its name in cPanel’s search box, Ctrl+K or Cmd+K), you can raise the setting there yourself instead. Changes in Select PHP Version can apply to every site on your account. In MultiPHP INI Editor, choose your domain rather than Home Directory, which changes every site, and always type the M: without it, 128 means 128 bytes, which can stop your site loading.

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. Ask us for the change instead.

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.