What the upload_max_filesize error means
upload_max_filesize is a PHP configuration directive that limits the size of an individual uploaded file. PHP reports this condition as UPLOAD_ERR_INI_SIZE.
WordPress cannot override a lower limit imposed by PHP after the request reaches the server. The Media Add New screen normally shows the maximum upload size exposed by the hosting environment, which gives you a useful first check before attempting a large theme, plugin, image or other permitted media upload.
There is a second PHP limit to consider. post_max_size controls the size of the complete POST request and should be larger than upload_max_filesize. Raising only the file limit can therefore leave the upload blocked by the overall request limit.
Why WordPress upload size limits vary
The limit is controlled primarily by the PHP configuration used by your hosting environment. Shared hosting, managed WordPress platforms, virtual servers and local development environments can expose these settings in different places.
You may have access through a hosting control panel, a site specific PHP configuration or php.ini. On managed hosting, the provider may deliberately control the maximum and require the change to be made through its own settings.
Do not assume a code snippet found for another server will work on yours. For example, Apache directives placed in .htaccess are not a portable way to change PHP configuration and can trigger a server error where that configuration method is unsupported. Changing the active PHP settings through the host or the correct PHP configuration is safer.
How to increase the WordPress upload size safely
- Take a full backup of the website files and database before changing PHP or server configuration.
- Check the limit displayed under Media, Add New. Confirm that the file genuinely exceeds it. If an oversized image can simply be resized or compressed before upload, that is often preferable to increasing a server wide limit.
- Use your hosting control panel's PHP settings if it provides them. Set upload_max_filesize to a sensible value for the files the site actually needs.
- Set post_max_size higher than upload_max_filesize. PHP's documentation specifically requires the POST limit to be large enough for the upload request.
- If your server uses a site controlled php.ini, the relevant configuration can look like:
The exact values are examples, not requirements. Avoid setting unnecessarily large limits.upload_max_filesize = 64M post_max_size = 72M - Confirm that the change applies to the PHP version and process serving the website. Some hosting platforms use separate PHP configuration for different sites or versions, so editing an inactive php.ini has no effect.
- Retest the upload. If the displayed WordPress limit has not changed, check your host's PHP configuration documentation or ask the host which configuration file is active.
WP_MEMORY_LIMIT is a different setting. Increasing WordPress memory does not by itself increase PHP's upload limit.
When to get help with PHP upload limits
Get help if PHP settings revert after you change them, the hosting panel shows one value while WordPress reports another, or you do not control the active PHP configuration. It is also worth investigating rather than raising limits repeatedly if only one plugin, import process or unusually large file requires them.
For production sites, upload limits should be high enough for legitimate administration without accepting arbitrarily large requests. PHP also notes that other settings, including post_max_size, memory and input timing, can affect large uploads.
Web Support Services offers an Emergency Fix for £249 per incident with a response within 2 working hours. Care plans start from £59 a month for ongoing website support.