Skip to content

Knowledge Base

Increasing PHP upload and memory limits

If you see errors such as "The uploaded file exceeds the upload_max_filesize", raise your PHP limits.


In DirectAdmin

  1. Log into DirectAdmin and open Select PHP Version under Extra Features.
  2. Open the Options tab.
  3. Change values such as upload_max_filesize, post_max_size, memory_limit and max_execution_time, and save.

With a file

You can instead add a .user.ini file in public_html with lines such as:

upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 256M

Things to know

  • post_max_size should be at least as big as upload_max_filesize.
  • Limits cannot go above the maximum for your plan.
  • See Changing your PHP version.
Please rate this article to help us improve our Knowledge Base.

0 0