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.

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

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 example.com with...

How do I create an A Record in my cPanel?

A records map a FQDN (fully qualified domain name) to an IP address and are one of the most...

How do I block an IP address using cPanel?

If there is an IP address you want to block from your website, you can do so inside cPanel. Here...