Freshet Studio Upload Max

Getting started

Freshet Upload Max raises the WordPress upload size limit without editing server config. Default 64 MB, overridable with a wp-config.php constant or an environment variable.

The 2 MB cap most sites start with is not a WordPress setting. It is a pair of PHP directives (upload_max_filesize / post_max_size), and on many hosts editing php.ini is a chore or simply off-limits. This plugin raises the real directive for you — no settings screen, no dashboard.

Requirements

MIT licensed. This page documents 1.0.1.

Install

Install and activate. Done — there are no settings. The new limit applies on the next request, with one caveat: PHP caches .user.ini for up to 5 minutes (user_ini.cache_ttl), so on a .user.ini host the new limit may lag activation by a few minutes.

What it writes, and where

The plugin writes a small, marker-delimited block to whichever mechanism your host actually reads:

SAPI Mechanism File
FastCGI / PHP-FPM / LiteSpeed .user.ini <wp-root>/.user.ini
Apache mod_php .htaccess php_value <wp-root>/.htaccess
anything else admin notice, no change

The .htaccess route is only ever taken when the handler is genuinely mod_php, because php_value directives 500 a FastCGI host. The block is marker-delimited (# BEGIN Freshet Upload Max), so the rest of the file is preserved and the block is cleanly removed on deactivation.

For a 64 MB target on a .user.ini host the block looks like this:

; BEGIN Freshet Upload Max
upload_max_filesize = 64M
post_max_size = 72M
memory_limit = 256M
; END Freshet Upload Max

post_max_size gets 8 MB of headroom so a full-size file plus its form fields fits — otherwise $_POST and $_FILES silently arrive empty. memory_limit is a floor for image sub-size generation on bigger uploads: raised where the host runs lower, never lowered where it already runs higher.

It does not fake the fix by only filtering the limit WordPress displays — that leaves the server rejecting the file with a confusing error. It raises the real PHP directive, or tells you in an admin notice when it couldn't.

Changing the limit

The default is 64 MB. To override it, in wp-config.php:

define( 'FRESHET_UPLOADMAX_MB', 128 );

or as an environment variable:

FRESHET_UPLOADMAX_MB=128

The constant wins over the environment variable; both win over the default. The value is clamped to 1–2048 MB. Some hosts impose their own hard ceiling above which nothing in userland can raise it — see Safety & limits.

Deactivating

Deactivating the plugin removes its block and restores the previous limit. The .user.ini is deleted if it becomes empty; .htaccess, which WordPress owns, is only stripped of the block.

Deleting the plugin also removes its own options, including the record of a block that deactivation could not clear.

What it does not touch

Scope is deliberately size-only: upload_max_filesize, post_max_size, and the memory_limit floor. Time limits (max_input_time, max_execution_time) for very large files on slow connections stay a server-config concern.

Next: Safety & limits.