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.

  • max size, php
  • 0 Uživatelům pomohlo
Byla tato odpověď nápomocná?

Související články

How to show hidden files (.htaccess) in cPanel File Manager?

Many users ask us how they can see the .htaccess files for their websites in cPanel File Manager....

How Can I Compress / Uncompress Files Using the File Manager?

How to Compress Files Go to the File Manager. Navigate to the folder where the files you want...

How to View Your cPanel Disk Space Usage?

In order to view your cPanel disk space usage, there’s a great tool located inside of your...

Accessing webmail for your domain

To access the included webmail email clients included with your hosting account, you’ll need to...

How to rename a database in phpMyAdmin?

phpMyAdmin is a free and opensource application for MySQL database management. It is one of the...