Support » Plugin: Increase Maximum Upload File Size » This plugin doesn’t do a good job

  • This plugin only changes the max_file_size option in the WP DB of the site to a value in bytes (ridiculous it can’t take a “K” or “M” suffix for the size). This is *not correct* because clearly the author hasn’t actually read the WP core code to see how WP limits the max upload filesize.

    Firstly, you need to look at the function wp_max_upload_size() in wp-includes/media.php. This read’s php.ini’s upload_max_filesize and post_max_size (hint for the author: wp_convert_hr_to_bytes() !!) and passes the lower of the two through to an upload_size_limit filter.

    You’ll find upload_size_limit_filter() in wp-includes/ms-functions.php and this looks in the site’s options table for the value of fileupload_maxk (falling back to 1500 if it’s not set). The smaller of the value passed through to the filter vs. the value of fileupload_maxk is then also compared against the filestore space free and the smallest of the lot is returned (unless that space check is disabled).

    Although this plugin is seriously faulty, it does highlight that fileupload_maxk doesn’t seem to be changeable from within the WP admin interface (even via /wp-admin/options.php) and this is particularly bad because it had a low value in my install (8000, which is just under 8MiB). I ended up using mysql on the command line to update the options table to change fileupload_maxk, which is quite hacky.

  • The topic ‘This plugin doesn’t do a good job’ is closed to new replies.