Skip to main content

Site Errors

How to Increase PHP Max Upload Size and Fix 413 Errors

Upload limits are set by two PHP values working together, upload_max_filesize and post_max_size, and raising just one without the other leaves the same ceiling in place.

413

HTTP error code returned when an upload exceeds the limit

2 settings

upload_max_filesize and post_max_size must both be raised

cPanel-style

Panel with a MultiPHP INI Editor for adjusting limits directly

24/7

Human support available if a plan-level cap needs raising

In short

How to increase PHP max upload size means raising two linked settings together: upload_max_filesize, which caps a single file's size, and post_max_size, which caps the entire form submission and must be set equal or larger. This is done through cPanel's MultiPHP INI Editor, a .htaccess directive, or a php.ini file, depending on what the hosting environment allows to be edited directly.

Every PHP-powered site enforces an upload ceiling through two settings that work together rather than separately: upload_max_filesize, which limits how large a single file can be, and post_max_size, which limits the total size of everything submitted in that request - including the file plus any other form fields sent alongside it. When a file exceeds either limit, the upload fails, often with a 413 Request Entity Too Large error or a WordPress media uploader that simply stops without a clear explanation.

The most common mistake when raising these limits is changing only upload_max_filesize and leaving post_max_size lower or equal, which means the individual file limit was raised but the overall request limit still blocks it. Since post_max_size caps the entire request, it always needs to be set equal to or higher than upload_max_filesize for the new, larger limit to actually take effect.

Why two separate settings control one upload limit

PHP separates upload_max_filesize from post_max_size because a single HTTP request can contain more than just the uploaded file - form fields, hidden inputs, and metadata all count toward the total request size that post_max_size governs. A media upload form submitting a 20MB image alongside a title and description field needs post_max_size set comfortably above 20MB, not exactly equal to it, to leave room for that additional data.

This is also why increasing only one setting is such a common troubleshooting dead end: raising upload_max_filesize to 64MB while post_max_size stays at 32MB means any file over 32MB still fails, because the request as a whole hits the lower ceiling before the file-specific one is even checked. Both values need to move together, with post_max_size set equal to or slightly above upload_max_filesize.

Raising the limits through cPanel's MultiPHP INI Editor

cPanel's MultiPHP INI Editor gives direct access to both settings without needing to locate or create a php.ini file manually. Selecting the domain and switching to Editor Mode exposes upload_max_filesize and post_max_size as editable fields alongside other PHP directives like memory_limit and max_execution_time, which sometimes need raising too if the upload triggers additional processing, like image resizing on a WordPress media upload.

After saving the new values in MultiPHP INI Editor, the change applies immediately without a server restart, since cPanel writes it into the account's active PHP configuration. It's worth testing the actual upload right after saving rather than assuming the change took effect, since a caching layer or an .htaccess override elsewhere in the account can sometimes still enforce an older limit.

Setting the limits via .htaccess or php.ini directly

On accounts where MultiPHP INI Editor isn't the preferred route, the same two values can be set directly in a php.ini file placed in the site's root directory, using lines like upload_max_filesize = 64M and post_max_size = 66M. Some server configurations also accept php_value directives inside .htaccess, though this depends on whether PHP is running as an Apache module versus CGI/FastCGI, since .htaccess-based PHP directives don't work under every configuration.

Whichever method is used, it's worth confirming the change actually applied by checking a phpinfo() output or the values shown in cPanel's PHP Selector, since a typo in the file or an unsupported directive in .htaccess will silently fail rather than throw an obvious error, leaving the original limit still in place while looking like it should have changed.

When the limit is set by the plan, not just PHP configuration

Some hosting environments cap the maximum value these settings can be raised to at the account level, which exists to keep shared-tier server resources balanced across every account on that server. If a needed upload size genuinely exceeds what the PHP settings allow to be raised, that's a plan-level ceiling rather than a configuration mistake, and it's worth checking with support rather than continuing to adjust the same files.

For sites that regularly need to handle large files - big media libraries, video uploads, or large e-commerce product imports - it's usually more efficient to confirm the plan's actual upload ceiling up front rather than repeatedly hitting a 413 error and troubleshooting the same two settings. Hosting Cheap's 24/7 human support can confirm what a given plan allows and adjust it directly where possible.

How to Increase the PHP Max Upload Size in Hosting

Raise upload limits directly through cPanel, no support ticket required

Hosting Cheap's cPanel-style panel includes a MultiPHP INI Editor that exposes upload_max_filesize and post_max_size directly, so most upload limit increases can be made in minutes without waiting on a configuration change from anyone else.

For the cases where a plan-level ceiling is the actual blocker, 24/7 human support can confirm what's possible and adjust it, rather than leaving a large media library or product import stuck on repeated 413 errors.

  • cPanel MultiPHP INI Editor for direct upload_max_filesize control
  • post_max_size guidance to avoid the most common half-fix
  • NVMe SSD to keep larger uploads processing quickly once allowed
  • 24/7 human support if a plan-level cap needs raising

Why Hosting Cheap

What you get

Direct PHP setting access

MultiPHP INI Editor exposes upload_max_filesize and post_max_size without needing a support request for routine changes.

Changes apply immediately

Saved PHP configuration changes take effect right away without a server restart.

NVMe SSD performance

Faster storage keeps larger file uploads processing smoothly once the limit allows them.

cPanel-style consistency

The same panel used for file management and email also controls PHP upload settings in one place.

24/7 human support

Support can confirm plan-level upload ceilings and adjust them when a genuine need exceeds the default.

30-day money-back guarantee

Confirm a plan's upload limits fit real usage with a full 30 days to test before committing.

How It Works

Get set up in a few steps

1

Open MultiPHP INI Editor in cPanel

Select the domain and switch to Editor Mode to see current upload_max_filesize and post_max_size values.

2

Raise both settings together

Set post_max_size equal to or higher than the new upload_max_filesize so the overall request isn't still capped lower.

3

Test the upload and confirm the change

Re-attempt the upload that triggered the 413 error to confirm the new limit actually took effect.

Included

Everything you need, on every plan

  • Confirm the exact error, such as a 413, to verify it's an upload limit issue
  • Check current upload_max_filesize and post_max_size values in cPanel
  • Raise post_max_size to equal or exceed the new upload_max_filesize
  • Check memory_limit and max_execution_time if the upload triggers processing like image resizing
  • Confirm the change applied by checking phpinfo() or the PHP Selector
  • Re-test the original upload that failed to confirm the fix worked
  • Check whether a plan-level cap limits how high the setting can go
  • Contact 24/7 human support if the needed limit exceeds what's adjustable directly

FAQ

Frequently asked questions

Why do I need to change post_max_size, not just upload_max_filesize?

post_max_size caps the entire request including the file and any other form data, so if it stays lower than upload_max_filesize, the request still gets blocked even though the file-specific limit was raised.

What causes a 413 Request Entity Too Large error?

A 413 error happens when an uploaded file, or the overall request containing it, exceeds the current upload_max_filesize or post_max_size setting configured for the site.

Where do I change PHP upload limits in cPanel?

cPanel's MultiPHP INI Editor, found under the Software section, lets you select a domain and edit upload_max_filesize and post_max_size directly in Editor Mode.

Does raising the upload limit require a server restart?

No, changes made through MultiPHP INI Editor apply immediately to the account's active PHP configuration without needing a restart.

Can I set PHP upload limits through .htaccess instead of cPanel?

Sometimes, using php_value directives, but this only works if PHP is running as an Apache module rather than CGI/FastCGI, so cPanel's MultiPHP INI Editor is generally the more reliable route.

What if I need a higher upload limit than my plan allows?

Some plans cap how high upload settings can be raised to keep shared-tier resources balanced. Contacting 24/7 human support can confirm the actual ceiling and whether it can be adjusted.

Still hitting an upload size limit?

Adjust upload_max_filesize and post_max_size directly in cPanel, or ask 24/7 human support to confirm your plan's actual ceiling.

Get Started