The error means PHP rejected the file before WordPress could process it. Increase the active PHP upload_max_filesize value, raise post_max_size to at least the same size, and make sure you changed the configuration used by the web PHP process—not a different command-line PHP installation. On managed hosting, the provider may have to make the change.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
What the error actually means
WordPress displays a message such as “The uploaded file exceeds the upload_max_filesize directive in php.ini” when the file is larger than PHP’s per-file upload limit. The setting applies to the PHP process handling the browser request, so changing a file that is not read by that process has no effect.
As an Amazon Associate I earn from qualifying purchases.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallTwo PHP directives matter together:
upload_max_filesizelimits the size of one uploaded file.post_max_sizelimits the complete HTTP request, including the file and the request’s other form data.
WordPress calculates its effective upload ceiling with the lower of those two values. A 100 MB upload_max_filesize does not permit a 100 MB upload if post_max_size is only 64 MB. The WordPress.org Developer Resources documentation states: “The value for post_max_size must be greater than or equal to the value for upload_max_filesize.”
PHP documentation also recommends keeping memory_limit higher than post_max_size. Memory is not the per-file limit, but processing a large image, archive or document can require substantial working memory after the request has been accepted.
Check the limit WordPress is using before changing anything
First measure the file in your computer’s file manager and note its size in megabytes. Then inspect the values exposed by the PHP installation serving the site. Looking at the wrong PHP installation is the most common reason an apparently correct change is ignored.
Use WordPress Site Health
- Sign in to the WordPress administrator area.
- Open Tools → Site Health and select the Info tab.
- Expand the Server section and record the PHP upload and post-size values shown there, if your WordPress version and host expose them.
This view reflects the web request that runs WordPress. It is more useful than checking only the php command in a terminal, because command-line PHP can load a different configuration file, version or SAPI.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Use the host’s PHP selector
Many control panels provide a PHP version or “PHP options” screen. Select the domain or site, locate upload_max_filesize, post_max_size and memory_limit, and record the current values before editing them. A host selector can apply settings per domain, per account or per PHP version, so confirm that the selected site matches the WordPress installation.
Use a temporary PHP information page only when necessary
If neither WordPress nor the control panel shows the directives, a controlled PHP information page can reveal the loaded configuration and the “local” and “master” values. Protect it while testing and remove it immediately afterward: a public PHP information page can disclose server paths, modules and configuration details that attackers can use.
Compare the file with both PHP limits
Write down three values: the file size, upload_max_filesize and post_max_size. The file must fit under both limits. The practical ceiling is:
effective WordPress upload limit = the smaller of upload_max_filesize and post_max_size
For example, with a 90 MB file, upload_max_filesize = 100M and post_max_size = 64M, WordPress still rejects the request because the request limit is smaller. Setting post_max_size = 128M resolves that particular mismatch, provided the active web PHP process actually reads the change and no web server or proxy imposes a lower cap.
Rank #2
Do not change limits merely to make the Media Library indicator look larger. Set them for the largest legitimate file your site needs, then leave enough memory and request-processing headroom for normal traffic. Oversized limits can allow unexpectedly large requests and increase the resources consumed by image processing, imports or failed uploads.
Choose the appropriate way to raise the limits
| Hosting arrangement | Where the setting is controlled | Who can change it | Typical scope and risk |
|---|---|---|---|
| Self-managed Apache/PHP | Active php.ini, or an allowed .htaccess/.user.ini override |
Server administrator | Can affect one site, a virtual host or the whole PHP installation; reload requirements depend on the deployment. |
| PHP-FPM deployment | FPM’s loaded php.ini and pool configuration, sometimes a per-directory user file |
Server administrator or hosting control panel | Web requests may use a pool configuration different from CLI PHP; FPM must be reloaded when required. |
| Managed shared hosting | Provider’s PHP selector or support-managed account limits | Account owner where overrides are enabled, otherwise the provider | Host policies may block overrides or impose separate request limits. |
| WordPress Multisite | Server PHP limits plus Network Settings for site-level upload controls | Server administrator and network administrator | Network settings cannot override a lower PHP ceiling; changes can affect every site on the network. |
Fix a self-managed Apache or PHP installation
Edit the active php.ini
Find the php.ini loaded by the web SAPI, not merely the file associated with command-line PHP. Set values in a safe order. This example is illustrative; choose sizes that match your actual workload:
memory_limit = 256M
post_max_size = 128M
upload_max_filesize = 100M
The ordering expresses the rule: memory_limit is higher than post_max_size, and post_max_size is at least as high as upload_max_filesize. The example is not a universal recommendation or a promise that every server can process a 100 MB file.
Save the file and reload the relevant PHP service or web server if the installation requires it. PHP-FPM commonly keeps configuration in worker processes, so a restart or reload is needed before new requests see changed values. Apache configurations can likewise require a service reload. Follow the service manager and hosting documentation for your operating system.
Use a per-directory override when permitted
Some Apache accounts allow PHP directives in .htaccess; some PHP configurations accept a .user.ini file. Add only the directives your host permits, for example:
upload_max_filesize = 100M
post_max_size = 128M
memory_limit = 256M
Do not assume that a syntactically valid file is being applied. Hosts can disable overrides, PHP can be running through FPM with different per-directory rules, and a file in the wrong document root can be ignored. Recheck the values from WordPress Site Health after the change.
Rank #3
Fix a managed or shared hosting account
Shared hosts can lock PHP directives at the server or account level. If the control panel does not offer these settings, or if a saved value reverts immediately, the account probably cannot override the provider’s policy.
Send support the exact values you need and identify the domain, PHP version and required file size. Ask the provider to confirm all of the following:
upload_max_filesizeis large enough for the file.post_max_sizeis at least as large asupload_max_filesize.memory_limitis higher thanpost_max_sizewhere the workload requires it.- The values apply to the PHP SAPI and pool serving the WordPress site.
- No web-server, firewall or reverse-proxy request-body limit is lower.
If the provider cannot raise the ceiling, the choices are to reduce the file, upload it through an alternative workflow supported by your application, or move the site to a plan that exposes the necessary PHP limits. A WordPress plugin cannot override a server-level directive that the host has locked.
Check for a second request-size limit
When PHP values appear correct but uploads still fail, another layer may reject the request first. A web server, reverse proxy, firewall or hosting platform can impose its own request-body cap. The resulting message may mention the web server rather than upload_max_filesize, but the symptom can look similar because the browser never receives a completed WordPress upload.
Ask the administrator or provider whether a separate request limit is configured. The limit must accommodate the complete request, not only the file, so it should not be set below the PHP post_max_size value. Change one layer at a time and test after each change; otherwise it becomes difficult to identify which ceiling is still active.
Why changing php.ini often appears not to work
You edited the CLI configuration
Terminal PHP and web PHP can use different versions, SAPIs and configuration paths. A command-line check can therefore show the new number while WordPress continues to report the old one. Trust the value shown by WordPress Site Health or by a protected page served through the same web request path.
Recommended Free Tools
PHP-FPM is reading another file or pool setting
PHP-FPM may load a version-specific php.ini and apply pool-level values. Editing a similarly named file elsewhere leaves the active pool unchanged. Verify the loaded file and pool assigned to the site, then reload FPM and test again.
The service was not reloaded
Long-running PHP workers can retain the old configuration. Reload the relevant PHP-FPM or Apache service according to your deployment, then start a new browser session and inspect the values again.
post_max_size is still lower
WordPress uses the lower of the two upload-related directives. Raising only upload_max_filesize cannot overcome a smaller post_max_size. Increase both, preserving the required ordering.
A host blocks overrides
If a .htaccess or .user.ini change produces no difference, the host may disallow it. Remove invalid directives rather than repeatedly adding files, and request a provider-side change.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →The file is larger than its displayed size after processing
The initial upload is checked against PHP’s request limits, but WordPress may then create image sizes, unpack an archive or run an import. A file that barely fits can still fail later from memory, execution-time or storage constraints. Leave operational headroom instead of setting the limits exactly equal to the file size.
WordPress memory settings are related but not interchangeable
WordPress has its own memory constants, but increasing them does not raise PHP’s file-upload directive. A site can report more WordPress memory while PHP still rejects a file at the request boundary. Conversely, a PHP limit can accept the request while image manipulation runs out of memory afterward.
Best Value
WordPress.org Developer Resources lists these defaults for 2023: WP_MEMORY_LIMIT is 40 MB for a standard installation, 64 MB for Multisite, and WP_MAX_MEMORY_LIMIT is 256 MB for administration requests. Those are WordPress defaults, not guarantees that the host grants those amounts or that they change upload_max_filesize. Treat them as context when diagnosing memory failures after an upload has already passed the PHP size check.
Multisite-specific checks
In WordPress Multisite, a network administrator can review the network’s upload space and maximum upload file size under Network Admin → Settings → Network Settings. These controls determine what sites in the network may use, but they cannot bypass a lower server-level PHP limit.
Free tools Windows power users keep installed
One-click scans. No signup required.
Check both layers in order: first confirm that PHP accepts the request size, then verify the network setting and the individual site’s remaining quota. Raising a PHP limit for a network affects the resources available to multiple sites, so coordinate the change with the administrator responsible for the whole installation.
Validate the fix safely
- Record the old values and the target file size.
- Change
upload_max_filesize,post_max_sizeand, when justified by the workload,memory_limit. - Reload PHP-FPM or Apache when required by the deployment.
- Return to WordPress Site Health and confirm the active values from the web request.
- Upload a small test file first, then test a copy of the real file.
- Watch the result for secondary failures such as memory exhaustion, timeout, storage quota or image-processing errors.
- Remove any temporary PHP information page and avoid leaving diagnostic files publicly accessible.
If the real file is close to the ceiling, test with a file slightly smaller than the configured limit and keep a margin for multipart request overhead. A successful small test confirms that the path works; it does not prove that every large file will complete processing.
Use the symptom to identify the remaining ceiling
| What you observe | Most likely cause | Next check |
|---|---|---|
The message explicitly names upload_max_filesize. |
The file exceeds the active per-file limit. | Confirm the web PHP value, then raise it and post_max_size together if permitted. |
| The configured upload value is high, but WordPress still rejects the file. | post_max_size or another request cap is lower. |
Compare both PHP values and ask about web-server or proxy limits. |
| Site Health shows the old value after editing a file. | Wrong configuration file, blocked override or unreloaded service. | Identify the active SAPI and reload the service; escalate to the host if overrides are locked. |
| The upload starts, then fails during processing. | Memory, timeout, storage or image-processing constraints rather than the initial upload ceiling. | Review PHP and WordPress memory, execution and storage conditions without confusing them with upload size. |
| Only one Multisite site fails. | Network upload setting, site quota or the file’s size relative to the network policy. | Review Network Settings and the site’s available space after confirming PHP limits. |
Practical sizing and security guidance
Choose the smallest limits that cover the largest legitimate operation. A site that only accepts photographs may need a different ceiling from one importing large backups or video files. The larger the request, the more memory, processing time and temporary disk space can be consumed, especially when WordPress creates derivative images or handles compressed archives.
- Keep
post_max_sizeequal to or aboveupload_max_filesize, never below it. - Keep
memory_limitabovepost_max_sizewhere PHP documentation and the workload require it. - Apply the change as narrowly as your hosting model allows instead of raising a global server limit without need.
- Review authentication, upload permissions and malware scanning separately; a larger size limit is not an access-control policy.
- Monitor disk space and failed requests after changing the ceiling.
When reducing the file is the better fix
If you cannot change server settings, or if the requested file is far larger than the site’s normal workload, reduce the file before uploading. Export a smaller archive, resize an image, remove unused media or split a data import according to the application’s supported procedure. Do not rename a file and expect its byte size to change; compression or actual resizing is required.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
For a managed site, reducing the file avoids a provider-side change but may not be appropriate for a backup or migration that must remain complete. In that case, ask the host whether it offers a supported import channel or a plan with configurable limits rather than weakening limits across unrelated sites.
Decision checklist
- Need a modest increase and have a PHP selector? Change both upload directives there, verify in Site Health and test.
- Run your own server? Edit the active web
php.inior an allowed per-directory override, reload the service and check for proxy limits. - Changed a file but nothing moved? Stop editing duplicates; identify the web SAPI, FPM pool and host override policy.
- On Multisite? Check Network Settings after confirming server-level PHP limits.
- Upload passes but processing fails? Investigate memory, timeout, storage and image-processing constraints instead of increasing only
upload_max_filesize.
Final verification
The fix is complete when the active web request reports values that accommodate the file, post_max_size is not lower than upload_max_filesize, the relevant service has been reloaded, and a representative upload completes through WordPress. If those conditions are true yet the request is still rejected, the remaining limit is outside the PHP directives—usually a host policy or web-server/proxy request cap—and the provider or server administrator must change it.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

