{"id":11581,"date":"2022-01-13T16:58:57","date_gmt":"2022-01-13T21:58:57","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=11581"},"modified":"2022-01-18T14:56:30","modified_gmt":"2022-01-18T19:56:30","slug":"increase-file-upload-size-apache","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/increase-file-upload-size-apache\/","title":{"rendered":"How to Increase File Upload Size In Apache Web Server"},"content":{"rendered":"\n
Out of the box Apache<\/a> has an upload limit of 2MB therefore there is a valid reason to increase file upload size to be able to handle larger files especially rich media such as video, audio, and image files.<\/p>\n\n\n\n You can use the Apache server directive LimitRequestBody<\/a> to define the file’s size limit. This can be done in the apache configuration file or from within the .htaccess file.<\/p>\n\n\n\n Here we can assume the file is the default document root folder.<\/p>\n\n\n\n Enter the following in the .htaccess file. The example below limits the size to 64 MB (in bytes).<\/p>\n\n\n\n The above can also be added to the Apache server configuration file If you opt to add the directive in the Apache server configuration then you will need to restart the server for the settings to take effect.<\/p>\n\n\n\n That’s it! You now know how to increase file upload size in Apache. You can also do the same configuration changes in PHP<\/a> by following this guide<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" Out of the box Apache has an upload limit of 2MB therefore there is a valid reason to increase file upload size to be able to handle larger files especially…<\/p>\n","protected":false},"author":1,"featured_media":11669,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,23,9,16],"tags":[58,193,313,433,449,526,531,573,591,635,638],"yoast_head":"\nDo This to Increase File Upload Size in Apache<\/h2>\n\n\n\n
$ sudo vim \/var\/www\/html\/.htaccess<\/code><\/pre>\n\n\n\n
<Directory "\/var\/www\/html\/assets">\n LimitRequestBody 67108864\n<\/Directory><\/code><\/pre>\n\n\n\n
httpd.conf\/apache.conf<\/code>.<\/p>\n\n\n\n
$ sudo service apache2 restart<\/code><\/pre>\n\n\n\n