← Back to blog

WordPress Upload Size: Find the Real Limit Before Editing PHP

October 11, 2026
WordPress Upload Size: Find the Real Limit Before Editing PHP

The fastest fix is usually raising upload_max_filesize and post_max_size through your host's control panel or a .user.ini file in your WordPress root. If that does not resolve it, the block is likely at the web server or proxy level, so check client_max_body_size on nginx or your CDN's file-size cap. A chunked-upload plugin is a solid fallback when you cannot touch server files. Confirm the result under Media → Add New, which always shows your site's actual effective limit.


TL;DR:

  • Choose the editing method by hosting type: use dashboard settings on shared hosting, .user.ini for PHP FPM, or the active php.ini on a VPS.
  • Keep post_max_size at least as high as upload_max_filesize; raise memory_limit and execution time carefully, since concurrent uploads can slow shared hosting.
  • The lowest PHP, web server, or proxy cap controls the final limit; nginx, Apache, IIS, and CDN settings can each block uploads independently.
  • A 413 error points to the server or proxy, while an upload_max_filesize message identifies PHP; HTTP errors usually signal timeout or memory exhaustion.
  • A chunked upload plugin helps when configuration access is unavailable, but it still needs disk space and cannot bypass an upstream proxy or CDN cap.

inSave Hosting
Find WordPress Hosting for Your Site
InSave Hosting offers WordPress-specific hosting, staging tools, and managed security features for website owners managing uploads and site settings.
Explore hosting options

Table of Contents

Quick checklist: choose the path that matches your hosting setup

The right method depends entirely on what kind of hosting you have, so start by identifying your setup before editing anything.

  • If your host gives you a dashboard with PHP settings, change upload_max_filesize and post_max_size there first.
  • On shared hosting without panel access, try adding a .user.ini file to your WordPress root, or contact support directly.
  • On a VPS or dedicated server, edit the active php.ini and reload PHP-FPM or Apache so the change takes effect.
  • If you run nginx, you also need to raise client_max_body_size, since PHP limits alone will not help.
  • If a CDN or reverse proxy sits in front of your site, check its own upload cap or route admin uploads around it.

Each path leads to the same result: an upload limit that actually matches what your media library needs.

Change PHP limits step by step: host panel, php.ini, .user.ini, .htaccess

Five directives control upload behavior: upload_max_filesize, post_max_size, memory_limit, max_execution_time, and max_input_time. For media-heavy sites, a common approach is to set upload-related limits to values in the low hundreds of megabytes, with memory_limit and max_execution_time adjusted accordingly to prevent processing issues. One rule matters more than any specific number: post_max_size must be equal to or larger than upload_max_filesize, or uploads silently fail even though the size looks fine, according to PHP's own manual.

To find which php.ini file is actually active, run php --ini from the command line on Debian or Ubuntu. On shared PHP-FPM hosting, a .user.ini file dropped in your WordPress root is usually the cleanest option, though changes can take a few minutes to propagate since PHP-FPM caches .user.ini files. Editing .htaccess with php_value directives only works on mod_php setups and can trigger a 500 error on FPM environments, so check your server type first.

  1. Identify your PHP setup (mod_php vs. PHP-FPM) before choosing where to edit.
  2. Back up the current php.ini, .user.ini, or .htaccess file before making changes.
  3. Add or edit the five directives listed above with your chosen values.
  4. Reload or restart the relevant service (PHP-FPM, Apache, or ask your host to apply the panel change).
  5. Reload the WordPress admin and check Media → Add New to confirm the new limit shows up.

Pro Tip: Change one value at a time when troubleshooting, so you know exactly which edit fixed (or broke) the upload.

Web server and proxy limits: nginx, Apache, IIS, and CDNs

PHP settings only matter if the web server in front of PHP allows the request through in the first place. A low nginx client_max_body_size is one of the most common silent blockers, since its default is far smaller than most media files.

  • On nginx, raise client_max_body_size inside the server block to a suitably larger value matching your upload needs, then test and reload the service.
  • On Apache, check LimitRequestBody in your virtual-host configuration, and note that mod_security rules or a reverse proxy in front of Apache can impose their own separate caps.
  • On IIS, raise maxAllowedContentLength inside web.config, specifying the limit in bytes rather than megabytes.
  • Behind a CDN like Cloudflare, confirm your plan's upload cap, since free and lower tiers often cap request bodies well below what your server allows; routing admin uploads through a direct subdomain can bypass that cap entirely.

Whichever layer you adjust, the lowest number across PHP, web server, and proxy settings is the one that actually governs your upload limit.

Plugin-based and chunked uploads: when and how to use them

When you cannot edit server files, a chunked-upload plugin like Nexura Upload Limits Manager splits a large file into smaller pieces that each stay under your existing upload_max_filesize and post_max_size, then reassembles the file on the server after every chunk arrives. That approach sidesteps per-request PHP caps without touching a single configuration file.

  • Install and activate the plugin from the WordPress repository.
  • Configure chunk size and any upload quotas in the plugin settings.
  • Run a test upload with a file close to your largest expected media size.

Pro Tip: Chunked uploads still depend on available disk space and the server's final merge step, so they will not help if your host enforces a proxy or CDN limit upstream.

Verify limits and map errors to causes

Before assuming a fix worked, confirm it in two places inside WordPress itself.

  1. Open Tools → Site Health → Info → Server to see the active upload_max_filesize and post_max_size values your server is actually running, a check documented by InspectWP.
  2. Go to Media → Add New and read the "Maximum upload file size" line, which reflects the lowest of all applicable limits combined.
  3. Match the error to its source: a message naming upload_max_filesize points to PHP, a 413 Request Entity Too Large points to nginx or a proxy, and a generic "HTTP error" during upload usually means a timeout or memory exhaustion rather than a size cap.
  4. If uploads succeed when tested locally on the server with curl but fail from the public site, a CDN or reverse proxy sitting in front of the app is the actual blocker.

Best practices and safety when increasing limits

A few habits keep larger upload limits from turning into a different problem.

  • Scope limits to authenticated admin paths where your setup allows it, rather than raising a single very large value for the entire public-facing server.
  • Raise memory_limit and max_execution_time alongside any size increase, since large files consume memory during processing even after the size cap is lifted.
  • Remember the practical ceiling on 32-bit systems sits near 2.1 gigabytes regardless of configured values.
  • Never rely on the client-side MAX_FILE_SIZE field alone, since it is trivial to bypass and does nothing to protect the server.
  • Back up every configuration file before editing it, and keep a short note of what changed so a rollback is straightforward later.

How InSave Hosting can help

We publish WordPress operational guides covering exactly this kind of server-side troubleshooting, written from day-to-day hosting support work. WordPress-optimized plans often run on PHP8 with dashboard controls that let you adjust PHP limits without touching a config file directly, and some include free migration if moving simplifies the fix. When a limit change still will not stick after the steps above, that is the point to reach out to support rather than keep editing files blind.

Common error messages and what they indicate

Three errors account for most upload failures, and each points to a different layer of the stack.

A message naming upload_max_filesize directly means PHP itself rejected the file before WordPress could process it, the simplest case to fix since it only requires raising that one value alongside post_max_size. A 413 Request Entity Too Large response, by contrast, never reaches PHP at all. It comes from the web server or a reverse proxy in front of it, most often nginx's client_max_body_size, and no amount of php.ini editing will resolve it.

A generic "HTTP error" during an otherwise normal-looking upload is the trickiest case, because it usually has nothing to do with file size. It typically signals that max_execution_time or max_input_time ran out before the upload finished, or that memory_limit was exhausted while WordPress processed the file, a scenario covered in guidance on fixing memory limit issues. If execution timeouts keep surfacing even after size limits look correct, a dedicated walkthrough on raising PHP's max execution time covers that specific adjustment in more depth.

Matching the error message to its layer, PHP, web server, or processing timeout, saves time that would otherwise go into guessing which file to edit.

Upload errors mapped to server layers

Impact of increased upload size on hosting plan performance and resource usage

Raising upload limits is not free in resource terms, even when the change itself takes thirty seconds. Larger upload_max_filesize and post_max_size values mean PHP reserves more memory headroom per request, and on shared hosting that headroom is drawn from a pool other sites on the same server also use. A memory_limit bumped to 256M or higher so one admin can upload large video files has a real effect on how many simultaneous PHP processes a server can run.

Longer max_execution_time values compound this, since a process holding a worker open for five minutes during a large upload is a worker unavailable for any other request in that window. On a busy site, several large uploads happening at once can visibly slow down everything else temporarily.

This is less of a concern on a VPS or dedicated server, where resources are not shared with unrelated accounts and you control the ceiling directly, which is one reason administrators who upload large files regularly often move from shared hosting to VPS plans for that isolation alone. It is worth treating upload limits as a setting to size deliberately for your actual content, rather than maxing out every directive "just in case," since the larger the ceiling, the more memory and execution time a single misbehaving upload can consume before anything times it out.

Impact of increased upload size on hosting plan performance and resource usage — overview diagram

Step-by-step guide to revert upload size changes if needed

If a larger upload limit causes unexpected slowdowns or errors elsewhere, reverting is as straightforward as the original change.

  1. Locate the backup of your php.ini, .user.ini, or .htaccess file you saved before editing, and restore the original values.
  2. If you used a host control panel, return to the same PHP settings screen and reset upload_max_filesize, post_max_size, and memory_limit to their previous or default values.
  3. On nginx, remove or lower the client_max_body_size directive you added, then run nginx -t && systemctl reload nginx to apply it.
  4. On Apache, restore the original LimitRequestBody value in the virtual-host file and reload the service.
  5. If a chunked-upload plugin was the fix, deactivate it or reset its chunk-size and quota settings back to defaults.
  6. Confirm the rollback took effect by rechecking Site Health → Info → Server and Media → Add New for the restored values.

Keeping a dated note of each change, what was edited, what value it replaced, and why, makes this process take minutes instead of guesswork.

Engineer perspective: quick lessons from running WordPress sites

The two issues I see most often are a post_max_size smaller than upload_max_filesize, and nginx's default client_max_body_size left untouched while someone only edits PHP. Checking both values together, before touching anything else, resolves most cases in minutes. Always back up config files first.

— Ihor

Try InSave Hosting's WordPress plans to remove upload-limit friction

If editing config files on every upload issue sounds like more work than you want, our WordPress hosting plans run on PHP8 with dashboard-level controls built specifically to cut that friction, backed by free migration and daily backups if you decide to move your site over.

inSave Hosting

Browse the WP Start, WP Growth, WP Pro, and WP Agency plans and see which fits your site's media needs before your next large upload turns into a troubleshooting session.

FAQ

How do I increase the upload limit in WordPress?

Edit upload_max_filesize and post_max_size through your host's control panel, or add a .user.ini file to your WordPress root on PHP-FPM hosting. Always raise post_max_size to match or exceed upload_max_filesize, then confirm the new limit under Media → Add New.

How do I resize a file before uploading it?

Compress images with a tool like TinyPNG or ShortPixel, or export video at a lower bitrate before uploading, so the file fits under your current limit without any server changes. This works as a temporary workaround while you sort out a permanent limit increase.

What is the maximum image size I can upload to WordPress?

There is no fixed maximum; it depends entirely on your server's upload_max_filesize, post_max_size, and any web server or CDN caps layered on top, with the lowest of those values setting the actual ceiling, as explained in InspectWP's upload size guide. Check Media → Add New in your dashboard to see your site's current effective limit.

How do I raise the maximum file upload size in cPanel?

In cPanel, open MultiPHP INI Editor, select your domain, and raise upload_max_filesize and post_max_size to your target value, such as 256M. Save the change and it typically applies within a minute, though you should still confirm it in WordPress under Media → Add New.

What causes an "Allowed memory size exhausted" error during upload?

This error means PHP's memory_limit ran out while processing the file, which can happen even after upload_max_filesize is raised high enough. Increasing memory_limit to 256M or higher alongside the upload size settings usually resolves it, a fix noted in guidance on memory limit issues.

Sources