Change the PHP maximum upload file size limit

This article explains how to change the maximum upload file size for PHP contents by utilizing the upload_max_filesize and post_max_size orders in a .htaccess document.

You may need to change the maximum upload file size for your site. But for security reasons, you must set a lower value to keep clients from uploading very large documents to your site. To do this, change the upload_max_filesize and post_max_size orders in .htaccess file.

Sign in to your cPanel and locate your .htaccess file under public_html and add below lines:

php_value upload_max_filesize 256M
php_value post_max_size 256M

To ensure that uploads work accurately, the post_max_size should be a little large than upload_max_filesize. For example, you can set the upload_max_filesize to 100M, and the post_max_size order to 102M.

Save to the .htaccess records and check your WordPress.

Change PHP Maximum Upload Size Using .user.ini -

If you are not able to increase maximum upload file size using .htaccess then probably the server you are using configured for .user.ini. Create a file .user.ini under public_html and add below lines:

upload_max_filesize = 256M
post_max_size = 256M

You can also verify using phpinfo function, make a PHP test file that contains the below code in a similar index where the .htaccess record is found:

phpinfo();

Load the test file in your internet browser, and afterward check for the name of the value.

Please enter a valid email address.

cPanel Reseller Hosting

At Cyberin, we have a reseller plan for individuals entering the hosting business. It offers cPanel, premium add-ons, unlimited storage, and access to top-notch data centers for an exceptional hosting experience with almost 100% uptime.

Try for ₹399 only

cPanel Web Hosting

Enjoy seamless and affordable cPanel hosting for personal or professional websites. Easily deploy open source applications with a single click and import projects from GitHub effortlessly. Our aim is to make the process simple and hassle-free.

Get Started Today!