When running an application, script, plugins, or even uploading a file via PHP, sometimes you might face an error when one of them exceeds the limitations set by your webserver. In this article, you will learn how to fix the error by increasing the default limit of upload_max_filesize through your .htaccess file.
In order to do that, access the .htaccess file that is located in your public_html folder.
Then, add the following lines at the end of the file, changing the limits according to your desired values, and click on Save.
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value memory_limit 512M
php_value max_input_time 180
php_value max_execution_time 180
Make sure that your plan supports the limits you are trying to set.
That’s it! Now you know how to increase your upload_max_filesize value through .htaccess 🚀
You can allocate the maximum limits available by checking the PHP info of your website.