WordPress Code Snippets

A fresh mix of code snippets and tutorials

Limit HTTP Request Size


This .htaccess snippet can be used to restrict the total size of the HTTP request body sent from the client.

Note that the first five lines are commented out with a #, and are included for reference only (it helps to not have to lookup common byte conversions). The actual directive that limits the request size is on the last line, which currently limits requests to 5 MB (i.e., 5242880 Bytes).

See also: Set PHP Limits with .htaccess


Learn more

.htaccess made easy

Show Support

Like our new Facebook Page to show support!