Change memory_limit and upload_max_filesize

If you encounter an error while working on your website, such as a critical error or Allowed memory size of… it means you need to change the appropriate parameters in PHP.INI. To do this, you need to access the cPanel.

  • Find the option MultiPHP INI Editor, simply start typing “Multi” in the upper corner, and the options will appear as shown in the image below.
cpanelphpinieditor Change memory_limit and upload_max_filesize
  • Now that we have opened it, we need to select the Domain we are working on.
cpanelphpinieditor2 Change memory_limit and upload_max_filesize

When we select it, we will get options like in the image above. Among them is everything we need.

If you received an error while uploading a theme or plugin, you need to modify two fields: upload_max_filesize and post_max_size.

If the theme is 30MB in size and you want to upload and set it, you should set more than that, for example, 50MB in both places and save.

If you received an Allowed memory size of… error, you need to modify the memory_limit field. Be careful here; it’s not good to set a value too large because your PHP processes and application use that value. If you set it too high, it may exceed other resources, causing the website to become unavailable.
Therefore, set the lowest possible value that allows your site to function. If 128M is not enough, try 256M; if that’s not enough, try 382M; if that doesn’t work, set it to 512M. Usually, every theme will work with 256M.

  • When you are finished, save and that’s it. Refresh your PHP page (the page you are working on) and try the upload or continue working again.
Scroll to Top