rawatweb

WordPress Upload Size Limit: Raising It Safely

Wordpress upload size limit: uploads failing because of size? A practical order for raising upload_max_filesize, post_max_size.

Editorial illustration of a large file passing through a size gate between a server and a WordPress panel.

Uploading a high-resolution image, a plugin from a third-party developer, or a purchased theme often ends with a vague message: “The uploaded file exceeds the upload_max_filesize directive in php.ini” or simply “This file is too big”. It is unclear what the limit is, who sets it, and whether it can be changed.

The WordPress upload limit is not a single number from a single place. Several layers each enforce their own cap, and the effective value is the strictest of them all.

Short answer: check the effective values under Tools → Site Health → Info → Server, compare them with the limit in your hosting panel, then raise upload_max_filesize and post_max_size through whatever configuration your host provides. Test with a file the size you actually need rather than lifting the limit as high as it will go.

Three layers that decide

The PHP layer controls how large a single file may be and how large the whole request may be. The two settings that matter are upload_max_filesize and post_max_size.

The web server layer can reject large requests before PHP ever sees them. Nginx has client_max_body_size; Apache has LimitRequestBody. When this layer refuses, the response is often a 413 rather than a PHP message.

The hosting layer can sit above both—through the panel, the plan policy, or network restrictions. Some providers cap uploads on purpose so shared resources stay stable. If that is what applies, no PHP setting will get around it.

Knowing which layer is refusing is the correct first step. Raising upload_max_filesize without checking post_max_size only moves the failure.

Read the error message precisely

Each message points at a different layer:

  • “exceeds the upload_max_filesize directive” — a single file is too large for PHP.
  • “exceeds the maximum upload size for this site” — WordPress itself is capping it via network settings or a plugin.
  • 413 Request Entity Too Large — the web server rejected it before PHP, usually Nginx.
  • Upload reaches 100% then fails — often post_max_size or a timeout.
  • Success message but no file — usually a permissions problem, not a size one.

Telling these five apart saves a lot of time. If the message names upload_max_filesize, do not touch Nginx. If the response is a 413, changing PHP will have no effect.

Check the effective values

Do not guess from a php.ini that may not be the one in use. Open Tools → Site Health → Info → Server and look for:

  • upload_max_filesize
  • post_max_size
  • max_file_uploads
  • max_execution_time
  • memory_limit

These values are the ones actually in force. WordPress also shows the effective upload limit in the media library, though the number is sometimes rounded.

With SSH access, php -i | grep -E 'upload_max_filesize|post_max_size' shows something similar for CLI—but be careful, CLI configuration can differ from FPM, so the panel remains the main reference.

Raising it through the hosting panel

The safest and most durable route is the hosting panel, because changes survive updates:

  1. Find the PHP settings or MultiPHP INI Editor menu.
  2. Change upload_max_filesize and post_max_size to fit your need.
  3. Keep post_max_size larger than upload_max_filesize, since one request can carry several files.
  4. Save and restart PHP-FPM if the panel asks you to.

On shared hosting without a panel, some providers accept adjustment requests via a ticket. State the values you need and why.

Wordpress upload size limit: Raising it through configuration files

When there is no panel, two paths are common:

.user.ini in the site root, for FPM-based PHP:

upload_max_filesize = 64M
post_max_size = 80M
max_execution_time = 300

Changes to .user.ini usually apply within minutes without a restart.

A local php.ini only works if the host allows it. Many providers ignore it for security reasons, so verify whether the change actually took effect by rechecking Site Health.

.htaccess with php_value only works under mod_php, which is one reason settings appear to do nothing on modern servers.

Whichever route you take, verify the result. Assumption is the main source of confusion on this topic.

Why post_max_size gets overlooked

An upload request never contains only a file. It carries form fields, a security token, and metadata. If post_max_size is smaller than upload_max_filesize, a file that technically passed the per-file limit still fails because the envelope is too large.

Worse, when post_max_size is exceeded PHP may empty $_POST and $_FILES entirely. WordPress then receives no clear error—the page just reloads or shows a misleading failure.

Rule of thumb: keep post_max_size roughly 25–30 percent above upload_max_filesize. If you upload several files at once, allow more headroom.

WordPress’s own limit and multisite

On a multisite install, upload limits can be set at the network level under Network Settings, and that value overrides site settings. If you changed PHP and the limit did not move, look there.

Plugins can cap size too—a security plugin inspecting uploads, or a form plugin with its own setting. Disable them temporarily in staging to confirm.

There are also constants in wp-config.php sometimes used to set an internal cap. Adjust or remove them if they are no longer relevant.

Wordpress upload size limit: After raising it — test with a real file

Raising a number is not the end of the job. Test with files that represent the actual need:

  1. Upload an image at the size of the largest file you normally use.
  2. Upload a PDF document or a plugin archive.
  3. Test from two different networks, since some proxies cap request size.
  4. Confirm the file really lands in uploads, not just appears in the library.
  5. Test from a mobile device, which often truncates uploads earlier.

If an upload seems to succeed but no file exists, size is not the issue—likely folder permissions or disk quota. That is a different case, covered in image upload fails in WordPress.

The cost of a higher limit

A large limit is not free:

  • Memory needed to process images rises, especially when generating thumbnails.
  • Execution time can run out on large files, leaving partial uploads.
  • Security exposure grows if the limit is very generous and file types are not validated.
  • Backups get bigger and slower.
  • Disk quota fills faster, which can take a site offline.

Raise it only as far as needed. A site that uploads product photos does fine with 32–64 MB. If you upload short videos, consider hosting them on a video service and embedding instead of pushing them into the media library.

Image size: compress before you raise

Most “the limit is too small” cases can be solved without touching configuration:

  • Compress images before upload; 60–80 percent savings is often possible with no visible difference.
  • Resize to the dimensions actually used. A 6000-pixel image for a 1200-pixel slot only adds weight.
  • Use modern formats such as WebP for primary images.
  • Avoid uploading raw files straight from a camera or designer.

These habits improve site speed and relieve pressure on the upload limit at the same time.

When the host refuses to raise it

Some plans genuinely cap uploads, and that is the provider’s call. Available options:

  • Upload over FTP into the right folder, then import with a file manager plugin. This bypasses PHP limits but must be done carefully.
  • Move to a higher plan if the need is routine.
  • Use external storage for large media.
  • Split archives into parts when uploading a large theme or plugin.

For plugins and themes, FTP upload is often the most practical answer and requires no configuration change at all.

Wordpress upload size limit: what matters first

The limit is set by three layers:

PHP, the web server, and the host. Raising one layer alone is never enough. Different error messages point at different layers—‘upload_max_filesize exceeded’ is not the same failure as a post_max_size overflow. Start with whichever wp-config.php is cheapest to check, not the one that sounds scariest. Leave time to check wp-config.php before calling wordpress upload size limit done.

Frequently asked questions

What is the ideal upload limit? There is no single number. Start from real need: 32–64 MB covers most business sites.

Why did the limit change on its own? Usually the host updated configuration, or the site moved to a server with different values. Record current values so comparisons stay easy.

Does a higher limit slow the site? Not directly. What slows a site is large files being processed and stored—especially uncompressed images.

Does this limit affect forms? Yes. Forms with file attachments obey the same limits, plus any limit set by the form plugin itself.

If you have raised the limit at every layer and uploads still fail, the cause is likely folder permissions, quota, or a network restriction. A free audit can map all three, while website maintenance includes configuration adjustments like this as routine work. If the site is currently down because the disk filled up, website emergency support can help immediately.

Read next: Padlock Gone: Fixing Mixed Content in WordPress, Slow WordPress Admin While the Front End Is Fast, WordPress Broken After Moving Hosts: 7 Checks to Run.

#media #file upload #php #hosting limits
Let's talk about your website

Does any of this look like your website?

Tell us on WhatsApp. We look first, explain what needs fixing, then you decide. For a fuller picture, request the free audit.

Chat with us