.png&w=3840&q=75)
Websites & Hosting3 min
How to Change Your Maximum File Upload Size (php.ini)
NS
NameSilo Staff8/20/2026
Share
To change the maximum file upload size for your website, you must increase the memory directives in your server's PHP configuration. Log into cPanel, open the MultiPHP INI Editor, select your domain, and increase both the upload_max_filesize and post_max_size parameters to your desired limit. Save the changes to bypass the upload restriction.
How PHP Directives Throttle Media Handlers
WordPress's media uploader doesn't set its own upload limit. It simply reports whatever ceiling PHP itself enforces at the server level. Two directives control this:
- upload_max_filesize: The maximum size of any single uploaded file.
- post_max_size: The maximum size of the entire form submission carrying that file, plus any other form data sent alongside it.
Since the file travels inside the POST request, post_max_size is always the outer container and must be at least as large as the file itself.
Why It Matters: Uploading Without External Tools
Premium themes bundled with demo content, uncompressed video files, or large plugin packages routinely exceed the default 2MB limit most hosting environments ship with. Without adjusting these values, the only workaround is uploading files manually via FTP, an extra step most users would rather skip entirely.
Raising the limit directly in PHP configuration lets you use WordPress's native uploader for files of any reasonable size, no FTP client required.
Method 1: The cPanel MultiPHP INI Editor
Step 1: Log into cPanel and locate MultiPHP INI Editor under the Software section.
Step 2: Under "Select a location," choose the domain you want to modify.
Step 3: Switch to Editor Mode for direct value entry, or use Basic Mode for a simpler form.
Step 4: Update these three values together:
- upload_max_filesize to your target size (e.g., 128M)
- post_max_size to a value equal to or larger than upload_max_filesize
- memory_limit to a value equal to or larger than post_max_size
Step 5: Click Apply or Save. Changes take effect immediately; no server restart required.
Method 2: The .htaccess Override
If MultiPHP INI Editor isn't available on your hosting plan, add these lines to your site's .htaccess file via File Manager:
php_value upload_max_filesize 128Mphp_value post_max_size 128Mphp_value max_execution_time 300php_value max_input_time 300Save the file and reload your site. Note that some managed hosting environments restrict .htaccess PHP overrides entirely, in which case MultiPHP INI Editor is the only option.
Common Mistakes
Increasing upload_max_filesize without raising post_max_size to match: This is the single most common configuration error. If upload_max_filesize is set to 128M but post_max_size remains at the old default of 8M, the entire POST request gets rejected before PHP even evaluates the individual file size. The upload fails silently or with a vague error, because the outer container was never large enough to hold the file in the first place. Always set post_max_size equal to or greater than upload_max_filesize, and set memory_limit equal to or greater than post_max_size.
Forgetting max_execution_time: A large file that fits within the size limits can still fail if the upload takes longer than the script's allowed execution window, particularly on slower connections.
What This Means for You
NameSilo Hosting includes cPanel with MultiPHP INI Editor, giving you direct control over these PHP directives without needing shell access or a developer.
Frequently Asked Questions
How do I increase max upload size in WordPress?
Adjust upload_max_filesize and post_max_size via MultiPHP INI Editor.
What is upload_max_filesize in php.ini?
The PHP directive controlling the maximum size of a single uploaded file.
Why does WordPress say my file is too large?
The file exceeds the server's current upload_max_filesize or post_max_size.
How do I edit php.ini in cPanel?
Use MultiPHP INI Editor under the Software section of cPanel.
What is post_max_size?
The maximum size of the entire POST request containing the uploaded file.
Does increasing upload limits slow down my website?
No measurable impact; the limit only applies during active uploads.
How do I fix the link you followed has expired error?
Increase upload_max_filesize and post_max_size; this error usually signals a size limit was exceeded.
Does NameSilo hosting restrict file uploads?
Standard limits apply by default, but MultiPHP INI Editor lets you raise them.
.png&w=2048&q=75)
NameSilo StaffThe NameSilo staff of writers worked together on this post. It was a combination of efforts from our passionate writers that produce content to educate and provide insights for all our readers.
More articleswritten by NameSilo

.png&w=3840&q=75)
.png&w=3840&q=75)