Sometimes you may need to increase the maximum file size that can be uploaded to your website. This is controlled by the PHP directives upload_max_filesize and post_max_size.
⚠️ Security Tip: Avoid setting this value too high, as allowing very large file uploads can pose security and performance risks.

Increase PHP maximum upload file size using .htaccess
.htaccessLog in to your cPanel and open File Manager.

Locate the .htaccess file in your public_html folder.
If it’s hidden, enable Show Hidden Files (dotfiles).

Add the following lines to the file:
php_value upload_max_filesize 256M
php_value post_max_size 256MSave the .htaccess file.
Note: The
post_max_sizevalue should be slightly larger thanupload_max_filesize.
Example:upload_max_filesize = 100M,post_max_size = 102M.
Test the changes by uploading a file in WordPress or your application.
.user.iniIf your server does not allow .htaccess overrides, you can use .user.ini:
Create a file named .user.ini in the public_html folder.

Add the following lines:
upload_max_filesize = 256M
post_max_size = 256MSave the file and reload your site.
phpinfo()Create a PHP test file (e.g., info.php) in the same directory where .htaccess or .user.ini is located.
Add the following code:
<?php
phpinfo();
?>Open the test file in your browser (e.g., https://yourdomain.com/info.php).
Check the values of upload_max_filesize and post_max_size to ensure your changes were applied.