21+ years in hosting · Jaipur, India · INR billing with 18% GST · 24/7 email support
Blog · WebJi® India

How to Increase Upload Size in WordPress

Quick answer

Increase WordPress upload size through the host-supported PHP settings for the domain. upload_max_filesize caps one file; post_max_size must allow the whole request and its overhead. Check memory, multisite and upstream limits separately. Use panel settings or supported .user.ini configuration as appropriate, then verify the effective values and an actual upload rather than assuming a theme snippet works.

For WordPress owners handling rejected uploads, with correct PHP directive modes, multipart overhead and configuration checks before changing timeouts or memory.

✓ In business since 2005
✓ INR + GST billing
✓ 24/7 Email Support — avg reply < 60 min
GuideWebJi®
knowledge
Read time
5 min
Sections
8
Updated
14 Nov 2026
Written by
WebJi® team

The three PHP limits that decide your upload size

WordPress upload size is bounded by the effective PHP request and file settings, and may also be limited by WordPress multisite or upstream server rules. Check the effective values before changing the configuration.

The three PHP limits that decide your upload size
SettingWhat it capsTypical default
upload_max_filesizeThe size of one uploaded fileCheck the effective value for this domain
post_max_sizeThe whole request body, which includes every file plus the form fieldsCheck the effective value for this domain
memory_limitHow much RAM the PHP process may use while handling the requestCheck the effective value for this domain
max_execution_timeHow many seconds the script may run before PHP stops itCheck the effective value for this domain

The rule is simple: post_max_size must be at least as large as upload_max_filesize, and memory_limit should be larger than post_max_size. Raise one and not the others and the file still fails, usually with a different error message.

Check the current limit before you change anything

Two places in wp-admin show the number, and they can disagree, which is the first clue about where the limit is set.

  • Media, Add New — the upload box prints "Maximum upload file size: X MB" under the drop area.
  • Tools, Site Health, Info — open Media Handling for the WordPress figure and Server for the PHP figure.
  • cPanel, MultiPHP INI Editor — shows the value the server will apply for that domain.

If Site Health shows a higher number than the media uploader, a WordPress-level cap is in the way, usually a multisite network setting. If both are low, the server is the place to change it.

Method 1: raise the limits in cPanel MultiPHP INI Editor

This is the method to use on shared hosting, because the panel writes the value where the server actually reads it.

  1. Log in to cPanel and open Software, then MultiPHP INI Editor.
  2. Choose the domain from the drop-down. Basic Mode edits the common settings; Editor Mode shows the raw ini file.
  3. As an example, set upload_max_filesize to 64M and post_max_size to 80M, with an appropriate memory_limit such as 256M if the host allows it. There is no required order of clicking these settings.
  4. Change timeout settings only if the measured failure indicates a timeout and the host permits it; raising size limits does not override proxy or FPM request timeouts.
  5. Click Apply, then reload Media, Add New in wp-admin. The new figure appears without a restart.

You know it worked when the upload box shows the new number and a file of that size uploads without an error. Test with a real file near the limit, not a 100 KB image.

Method 2: use .user.ini on a PHP-FPM account

PHP CGI/FastCGI setups, including applicable FPM configurations, support per-directory .user.ini files when enabled. php_value in .htaccess applies to compatible Apache-module configurations; an unsupported directive can cause HTTP 500, but that error alone does not prove the handler.

Where the host supports .user.ini, an illustrative configuration for a 64M file cap is:

upload_max_filesize = 64M
post_max_size = 80M
memory_limit = 256M
These are example values, not a promise that this hosting account permits them. post_max_size needs room for the full multipart request, not only the file.

PHP normally re-reads per-user INI files according to user_ini.cache_ttl, whose documented default is 300 seconds. If the value remains unchanged, check the active file, handler, overrides and host policy rather than assuming one cause.

Why php_value in .htaccess and functions.php filters fail

upload_max_filesize and post_max_size are INI_PERDIR directives processed before the upload reaches application code. memory_limit is INI_ALL and can often change at runtime unless locked by host configuration. These are not all the same setting mode.

  • If a new php_value directive causes HTTP 500, restore the previous configuration and inspect the server error. Confirm the handler before selecting .htaccess, panel settings or .user.ini.
  • A functions.php filter that appears to do nothing — the directive is per-directory, not runtime.
  • Values that revert after a day — the panel or the host reset the file. Check who owns the setting.

When the error is not the upload limit

Four failures look like an upload size problem and are something else. Match the message before you change a setting.

When the error is not the upload limit
Message or symptomActual cause
The uploaded file exceeds the upload_max_filesize directiveThe limit itself. Raise it as above.
POST Content-Length exceeds the limit of 8388608 bytespost_max_size is lower than the file plus the form. Raise post_max_size first.
The link you followed has expiredMay involve upload limits, nonces or request handling; inspect the actual error before increasing timeouts
Maximum execution time exceededThe same timeout, reported by PHP. Also check the 300 second figure in FPM.
No error, file vanishesInvestigate PHP upload status, storage and application processing; the symptom alone is not a diagnosis

A multisite network adds one more cap: Settings, Network Settings, Upload Settings. The server limit has to be raised first, and the network setting has to match, or the smaller of the two wins.

Upload by FTP or use a plugin when the limit is fixed

Some hosts will not move the limit on a shared plan. Two workarounds exist, and both have a catch worth knowing.

  • SFTP can transfer a file without PHP’s browser-upload path, but copied media is not automatically registered in WordPress. Keep backups outside the public document root, and use a documented import method for media.
  • A chunked uploader changes how data is transferred; it still has application, storage and server constraints. Verify the specific plugin’s documented behaviour rather than assuming it removes every cap.

For a site that uploads video every week, the honest answer is a plan with a higher cap, not a plugin fighting a 2 MB ceiling.

Where this fits on a WebJi® account

Use the settings exposed for the actual domain and hosting configuration. If a control is absent or a value is constrained, ask the host to confirm the supported change rather than assuming every account permits arbitrary limits.

Ask support whether the requested limit is permitted and which configuration layer controls it; a support request does not guarantee that the plan allows the value.

The WordPress memory-limit guide separates runtime memory from upload acceptance. Check the active PHP configuration and application error logs before raising unrelated values.

FAQ

Frequently asked questions

How do I increase the maximum upload size in WordPress?

Use the host-supported configuration for the active domain, keeping post_max_size larger than the intended file size to allow request overhead. Verify both the media uploader and an actual upload. There is no required order for changing the settings; server and multisite caps may still apply.

A runtime function cannot retroactively change limits used to accept the uploaded request. upload_max_filesize and post_max_size are per-directory directives, while memory_limit has different runtime permissions. Check the directive mode and host restrictions instead of treating a theme snippet as a universal upload fix.

Can I raise the limit with a functions.php filter?

Check the complete request size, multisite limits, upstream request constraints, temporary storage and the actual upload error. A higher displayed PHP value does not prove every layer accepts the request. Diagnose the measured failure before adding larger timeouts or more memory.

Why does the upload still fail when the limit is higher?

SFTP can move data without the browser-upload route, but does not automatically register media in WordPress. Use a supported importer where needed and keep private backups outside public directories. A chunking plugin also needs documented handling for its own limits and storage requirements.

Can I upload a large file without changing PHP settings?

Yes, over FTP into wp-content/uploads, which bypasses PHP, or through a plugin that chunks the file into smaller pieces. FTP skips the media library, and a chunking plugin is still bounded by the server's limit, just less visibly.

Last editorial update: 14 November 2026.

WebJi® since 2005

Ready to get started with WebJi®?

Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.