WordPress has a very distinct way of doing things when it comes to file uploads. There is the restriction that PHP puts into place with file uploads (ie upload_max_filesize and post_max_size), and restrictions that WP puts in via values in the database.
With the PHP values, if you need to upload large files you will either need to edit the php.ini file, or edit the .htaccess file to get the values high enough so PHP doesn’t run out of memory with the upload.
To set the PHP values in .htaccess:
- Add the following:
- php_value upload_max_filesize #M
- php_value post_max_size #+1M
With post_max_size, the number of M’s needs to be higher than the upload_max_filesize, and from my testing adding 1 to the upload_max_filesize is enough to suffice.
WordPress restricts uploads in a different way. In WPMU in the wp_sitemeta table there are 3 fields that need to be updated when large files need to be uploaded.
- blog_upload_space – The amount of space a single blog has to upload files to
- fileupload_maxk – The largest file that may be uploaded (I believe this is in bytes)
- upload_filetypes – This restricts the MIME type that can be uploaded I believe through the Flash uploader