How to increase your PHP memory or upload limit

Seeing "upload exceeds the maximum" or "allowed memory size exhausted"? Sites start with memory_limit 128M, upload_max_filesize 2M and post_max_size 8M. Those limits are not yet self-service in CHPanel, but you can raise them yourself with a small .user.ini file — or ask us to do it.

Add a .user.ini file

  1. Sign in at chpanel.bphost.biz with your hosting account email address and CHPanel password, then open Files → File Manager and go into public_html (or the folder of the addon domain or subdomain concerned).
  2. Click + File and name it exactly .user.ini, with the leading dot.
  3. Click Edit on the new file and add these lines, one per line:
  • upload_max_filesize = 64M
  • post_max_size = 64M
  • memory_limit = 256M

Save the file. PHP re-reads it every five minutes, so wait a moment before trying your upload or page again.

What the settings mean

  • upload_max_filesize and post_max_size — the biggest file you can upload through a form. Keep post_max_size at least as large as upload_max_filesize.
  • memory_limit — how much memory one script may use. 256M suits most WordPress sites.

Adjust the numbers to what you need; 64M and 256M are sensible starting points.

Trouble?

Limits are still capped by the server, so very large values will not be honoured. If the error is still there after a few minutes, or you would rather we set it for you, open a support ticket saying which site and which value you need.

Was this answer helpful?

 Print this Article

Also Read

How to upload your website

Once your hosting is active, put your website online by uploading its files to the public_html...

How to set up an FTP account

FTP lets you upload and manage your website files with a program like FileZilla or Cyberduck....

How to change your PHP version

Different apps need different PHP versions. In CHPanel you choose the PHP version per website,...

How to set up a redirect

Redirects send visitors from one address to another — useful when you move a page, rename it, or...

How to create a custom 404 error page

A friendly page not found (404) page keeps visitors on your site instead of hitting a blank...