How to change upload max file size in php

By default, PHP is set to allow uploads of files with a size of 2MB or less. If you are using a PHP script such as WordPress and need to increase the upload max file size, then you will have to adjust your PHP settings from cPanel and raise the values for "upload_max_filesize" and "post_max_size".

To change the "upload_max_filesize" and "post_max_size" for PHP, follow these simple steps:

  1. Log into cPanel.
  2. Under the Software section, click 'Select PHP Version' icon.
  3. Then click 'Switch to PHP options' link.
  4. You can now change the values for upload_max_filesize and post_max_size
  5. click the Apply button.
  6. hit the Save button & enjoy!

Additional information
The value of post_max_size should not exceed the PHP memory_limit.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How can I show hidden files (htaccess) when using cPanel File Manager

By default, when using cPanel's File manager, it will not display hidden files and folders until...

How do I change my cPanel password?

Follow these steps to change your cPanel account password Login to the cPanel Click Change...

How can I check my Resource Usage from cPanel?

You can check your CPU/Memory(RAM)/Disk I/O and other resource usage by logging into cPanel. 1....

How do I login to my cPanel control panel?

You can access your cPanel control panel via any of the following links (replace

How can I increase my PHP memory limit?

You can easily change the memory_limit for PHP by following these steps. Log into cPanel...