The three PHP limits that decide your upload size
Raise upload_max_filesize and post_max_size together, then memory_limit, in cPanel's MultiPHP INI Editor for the domain. The values have to move in that order. On an account running PHP-FPM, a php_value line in .htaccess returns a 500 error, so the setting goes in .user.ini instead. Confirm the new figure under Tools, Site Health.
| Setting | What it caps | Typical default |
|---|---|---|
| upload_max_filesize | The size of one uploaded file | 2M to 64M |
| post_max_size | The whole request body, which includes every file plus the form fields | 8M to 64M |
| memory_limit | How much RAM the PHP process may use while handling the request | 128M to 256M |
| max_execution_time | How many seconds the script may run before PHP stops it | 30 to 60 |
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.
- Log in to cPanel and open Software, then MultiPHP INI Editor.
- Choose the domain from the drop-down. Basic Mode edits the common settings; Editor Mode shows the raw ini file.
- Set upload_max_filesize to 64M, post_max_size to 64M, and memory_limit to 256M. Keep memory_limit above post_max_size.
- If large media is the job, raise max_execution_time to 300 and max_input_time to 300 in the same screen.
- 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
Most stock cPanel servers run PHP through FPM. That setup ignores php_value in .htaccess and reads a .user.ini file in the document root instead.
Create or edit .user.ini in public_html with four lines: upload_max_filesize = 64M, post_max_size = 64M, memory_limit = 256M, max_execution_time = 300. Save it as plain text with no byte-order mark, and set the permissions to 644.
The change is not instant. PHP caches user ini files, by default for 300 seconds, so wait five minutes before you test. If nothing changes after that, the host has locked the setting at server level and only support can move it.
Why php_value in .htaccess and functions.php filters fail
Both are popular advice and both usually do nothing on a modern host. The reason is the setting's mode: upload_max_filesize, post_max_size and memory_limit are PHP_INI_PERDIR. They are read before the script runs, so ini_set() inside functions.php cannot change them, whatever a snippet promises.
php_value in .htaccess only works when PHP runs as an Apache module, which shared hosts stopped doing years ago for security. On FPM the server rejects the directive and returns 500, which looks like a broken site rather than a failed setting.
- A php_value line added to .htaccess, then a 500 on every page — remove the line, the server runs FPM.
- 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.
| Message or symptom | Actual cause |
|---|---|
| The uploaded file exceeds the upload_max_filesize directive | The limit itself. Raise it as above. |
| POST Content-Length exceeds the limit of 8388608 bytes | post_max_size is lower than the file plus the form. Raise post_max_size first. |
| The link you followed has expired | The upload ran past max_execution_time or the request hit the server timeout. Raise the time limits. |
| Maximum execution time exceeded | The same timeout, reported by PHP. Also check the 300 second figure in FPM. |
| No error, file vanishes | Disk quota on the account, or uploads folder permissions. Check the quota in cPanel, then the folder. |
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.
- FTP upload — put the file in wp-content/uploads/2026/10/ with FileZilla or cPanel File Manager. It bypasses PHP entirely, but the file is not in the media library until something registers it, so use this for a theme ZIP or a backup, not for an image you want in a post.
- A chunking plugin — an upload plugin slices a large file into pieces the server will accept. It works within a server limit rather than removing it, and chunked uploads are slower. Leave the plugin active, or the limit reverts.
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
WordPress hosting here runs cPanel with MultiPHP INI Editor, so the first method works without a ticket, and the cPanel hosting page lists what the panel exposes. The PHP memory figure has its own walkthrough in the memory limit guide.
If the panel will not accept a value, email support@webji.services with the domain and the number you need. Support is 24/7 by email in Hindi and English, with an average first reply under 60 minutes, and can raise a server-level cap that the panel does not expose.
Frequently Asked Questions
How do I increase the maximum upload size in WordPress?
Open cPanel, then Software, then MultiPHP INI Editor, pick the domain, and raise upload_max_filesize, post_max_size and memory_limit in that order. Keep post_max_size at or above upload_max_filesize, apply, then check Media, Add New for the new figure.
What is the difference between upload_max_filesize and post_max_size?
upload_max_filesize caps one file. post_max_size caps the whole request, which includes every file plus the form fields, so it has to be at least as large. If only the first is raised, a large upload fails with a POST Content-Length error.
Why does php_value in .htaccess cause a 500 error?
php_value only works when PHP runs as an Apache module. On PHP-FPM or CGI, which most cPanel servers use, Apache rejects the directive and every page returns 500. Remove the line and put the setting in .user.ini or in the panel instead.
Can I raise the limit with a functions.php filter?
No. upload_max_filesize, post_max_size and memory_limit are per-directory settings that PHP reads before your theme loads, so ini_set() cannot change them in time. The filter runs too late to matter.
Why does the upload still fail when the limit is higher?
Check three things: post_max_size against the real request size, max_execution_time for a slow upload, and disk quota on the account. One of those is almost always the remaining cap, and the error message names which.
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.

