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 view Awstats from cPanel?

AWStats is disabled by default on all accounts. You can enable AWStats from cPanel at anytime...

How do I login to my cPanel control panel?

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

How To Fix 403 Forbidden Error?

Have you ever lead to a page saying 403 forbidden error while navigating through the webpages?...

How to set domain MX records to remote settings in cPanel

What is an MX record? A mail exchanger record (MX record) is part of your DNS (domain name...

How can I increase my PHP memory limit?

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