Unable to upload large files (wordpress, apache, php, cpanel)

There are several settings, that control maximum file size, that can be uploaded to WordPress (and basically any PHP script, that can process it).

First check your php.ini file. There are two settings:

upload_max_filesize = 500M
post_max_size = 500M

Second – if you are using ModSecurity – there is a maximum allowed body setting. On cPanel installations it is set to default 100mb, which is “ok” for most situations, but is not enough for big file uploads.

You can change this variable by adding the following line to Apache’s config file:

# instruct mod_security to allow 1GB file uploads
SecRequestBodyLimit 1073741824

If you know other configuration settings, that may affect file uploading – please let me know.