Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Short answer: set upload_max_filesize to the largest single file you want to accept, then set post_max_size higher so the entire multipart request fits. For slow or large uploads, also check max_input_time, memory_limit, and max_file_uploads. If PHP still rejects the request, raise the web server’s request-body limit, change the configuration used by the web request rather than only the command-line PHP configuration, reload the relevant service, and verify the effective values.
PHP’s current manual lists defaults of 2M for upload_max_filesize, 8M for post_max_size, and 20 for max_file_uploads (manual checked October 27, 2026). Those defaults are often too small for modern media files, but increasing them safely requires matching PHP, the front-end web server, and any application-level limit.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallAs an Amazon Associate I earn from qualifying purchases.
Which PHP settings determine the maximum upload size?
There is not one universal upload setting. A successful upload must satisfy the per-file limit, the whole-request limit, the time allowed to receive the request, and any memory, file-count, or web-server restrictions in front of PHP.
| Directive | What it controls | Current default or rule | When to adjust it |
|---|---|---|---|
upload_max_filesize |
The maximum size of one uploaded file. | 2M in the current PHP manual. |
Raise it to at least the largest individual file you intend to accept. |
post_max_size |
The complete HTTP POST body, including the file, multipart overhead, and other form fields. | 8M in the current PHP manual; it must be larger than upload_max_filesize. |
Set it above the file limit, with additional headroom for the rest of the request. |
max_input_time |
The time PHP may spend receiving and parsing incoming data, including file-upload time. | -1 uses max_execution_time; 0 means unlimited input time. |
Increase it when a slow connection times out before the file is completely received. |
memory_limit |
Memory available to the PHP request while it handles the upload and subsequent processing. | PHP’s upload guidance does not establish one universal value for this purpose. | Review it when large files cause memory or processing failures. |
max_file_uploads |
The number of files accepted in one request. | 20 in the current PHP manual. |
Raise it only when a form genuinely sends more files at once. |
The two size directives are the usual source of confusion: upload_max_filesize applies to each file, while post_max_size applies to everything in the request. A 60 MB file therefore needs a per-file limit of at least 60 MB and a request limit larger than 60 MB.
Popular on Amazon
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
What values should I use for a larger upload?
A practical starting configuration is:
upload_max_filesize = 64M
post_max_size = 80M
max_input_time = 300
These are example choices, not PHP defaults. The 80 MB request limit leaves room for multipart boundaries, field values, and other request data. If your application accepts several files in one submission, size the request limit for their combined total rather than for only the largest file.
Choose the limit from the real file and request sizes
- Set
upload_max_filesizeto the largest single file the feature should accept. - Set
post_max_sizehigher than that value. The PHP manual says it must be larger; WordPress documentation says it must be greater than or equal to the per-file value. In practice, a higher value avoids rejecting the request because of overhead or additional fields. - For multiple-file forms, estimate the sum of all files plus request overhead and choose a request limit above that total.
- Set
max_input_timehigh enough for the slowest permitted connection to transfer the request. PHP documents that this timer includes file-upload time. - Review
memory_limitif the upload reaches PHP but later processing fails, and reviewmax_file_uploadswhen the problem occurs only with many files.
Do not confuse a larger allowance with an unlimited upload
Raising PHP’s values does not override a smaller limit in Apache, Nginx, Lighttpd, a reverse proxy, or the application handling the form. Every layer that receives the request must allow at least the intended request size.
Where do I change the PHP upload settings?
The correct file depends on the PHP SAPI serving the site and on your hosting permissions. Common possibilities are the active php.ini, a permitted .user.ini, or .htaccess when PHP runs through Apache mod_php.
Use the configuration read by the web SAPI
Command-line PHP and web-request PHP can load different configuration files. A value shown by a terminal command can therefore differ from the value used by a dashboard or upload endpoint. Inspect the configuration for the web SAPI, not just the CLI installation.
One way to expose the web SAPI’s effective settings temporarily is a PHP information page:
Recommended Free Tools
<?php phpinfo(); ?>
Open that page through the same virtual host and PHP handler that processes the upload, locate Loaded Configuration File, and check the effective values for upload_max_filesize, post_max_size, max_input_time, memory_limit, and max_file_uploads. Remove the information page after checking it because it reveals server configuration details.
Also popular on Amazon
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
When you have server access
- Identify the PHP configuration file loaded by the web service.
- Edit the directives with values appropriate for the files and requests your application accepts.
- Check the front-end server’s request-body limit and raise it to at least the intended request size.
- Reload or restart the relevant Apache, Nginx/PHP-FPM, or IIS services as required by the hosting stack.
- Verify the values through the web SAPI and then make a controlled upload through the actual application.
When you use shared hosting
Shared hosts may permit per-directory settings in .user.ini or, with Apache mod_php, in .htaccess. Some hosts disable those methods or impose their own maximum. If the permitted file does not change the web SAPI values, the host administrator must change the server-level configuration.
How do I raise the limit in php.ini, .user.ini, or .htaccess?
Use the method your host allows and place the directives in the configuration scope that serves the upload endpoint. The syntax is the same for the PHP directives:
upload_max_filesize = 64M
post_max_size = 80M
max_input_time = 300
An administrator normally places these lines in the active php.ini. A host that permits .user.ini can accept the same directives at the site or directory scope. Apache installations using mod_php may allow PHP settings in .htaccess, although many PHP-FPM deployments do not.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsDo not assume that editing a file named php.ini changed the live site. Multiple PHP versions, separate virtual hosts, PHP-FPM pools, and different SAPIs can each use a different configuration. Verification through the web request is essential.
What web-server settings can reject the request before PHP sees it?
A front-end server can reject an oversized request before PHP parses it. In that case, changing PHP directives alone has no effect.
| Server | Request-size directive | What to do |
|---|---|---|
| Apache | LimitRequestBody |
Set it at least as high as the intended complete request size, then reload Apache. |
| Nginx | client_max_body_size |
Set it at least as high as the intended request size, then reload Nginx. |
| Lighttpd | server.max-request-size |
Raise it to cover the complete request and reload Lighttpd. |
MediaWiki’s official upload documentation identifies these directives as the relevant controls for Apache, Nginx, and Lighttpd. If a proxy sits between the browser and the web server, check that layer’s body-size and timeout policy as well.
Also popular on Amazon
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Why the web-server value should exceed the file value
Web servers limit the entire request, not just the file part. Match their limit to the desired post_max_size or slightly above it, so the front end does not reject a request that PHP is configured to accept.
Free tools Windows power users keep installed
One-click scans. No signup required.
How do I increase the maximum upload size in WordPress?
WordPress relies on PHP for dashboard media uploads, so the PHP and web-server settings must be correct first. WordPress documentation states that post_max_size applies to the entire request and must be greater than or equal to upload_max_filesize.
Why changing only one PHP value does not work
The WordPress function wp_max_upload_size() converts both PHP size directives to bytes and returns the smaller value, subject to the upload_size_limit filter. If you increase upload_max_filesize but leave post_max_size lower, WordPress continues to report the lower effective maximum. The same happens in reverse.
WordPress troubleshooting sequence
- Set
upload_max_filesizeto the desired individual-file limit. - Set
post_max_sizehigher than that limit and high enough for the complete request. - Confirm the web server’s request-body limit is not lower.
- Reload the PHP handler and web server when the hosting stack requires it.
- Check the limit displayed by the WordPress upload interface and compare it with the web SAPI’s effective PHP values.
- If WordPress still reports a lower number, check for an
upload_size_limitfilter or a host-level restriction.
Why are $_POST and $_FILES empty after a large upload?
PHP documentation identifies an empty $_POST and $_FILES as a typical symptom of exceeding post_max_size. PHP may discard the request before your application receives the file fields.
- Raise
post_max_sizeabove the complete request size, not merely above the file size. - Confirm that the changed value belongs to the web SAPI handling the upload.
- Check the web server and any proxy for a smaller body-size limit.
- Reload the relevant services and verify the effective value before repeating the upload.
What does an HTTP 413 or generic web-server failure mean?
An HTTP 413 response usually indicates that a front-end server or proxy rejected the request as too large before PHP processed it. A generic server failure can have the same cause.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Check the directive for the server that actually receives the connection: client_max_body_size for Nginx, LimitRequestBody for Apache, or server.max-request-size for Lighttpd. Raise the applicable value to cover the complete request, reload that service, and then verify that PHP’s post_max_size is not lower.
Also popular on Amazon
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
How do I fix a timeout during a slow upload?
PHP’s max_input_time includes the time spent receiving file-upload data. A request can therefore fail even when its size is below every limit if the connection is too slow for the configured input window.
Check the PHP input timer
Increase max_input_time to allow the slowest expected transfer to finish. PHP documents -1 as using max_execution_time and 0 as unlimited input time; choose deliberately rather than treating either value as a universal fix.
Check upstream request and proxy timeouts
Web servers and reverse proxies can impose their own request or proxy timeouts. Raising only max_input_time cannot extend a shorter timeout enforced before PHP receives the complete body.
What if the upload reaches PHP but processing fails?
Review memory_limit when the file arrives but PHP fails while processing, resizing, validating, or storing it. PHP’s upload-pitfall guidance notes that larger uploads may require more memory.
For forms that send many files, check max_file_uploads. Its default of 20 limits the number of files in one request; it does not increase the permitted size of an individual file. Raise it only when the application genuinely needs more simultaneous file fields.
Which configuration approach should I choose?
The best path depends on access, scope, and the server stack.
Also popular on Amazon
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
| Approach | Access required | Scope | Reload needed | Main limitation |
|---|---|---|---|---|
Server-level php.ini |
Administrator or managed-host access. | Often applies to the PHP installation, pools, or multiple sites. | Usually reload or restart the PHP handler and possibly the web server. | Can affect unrelated applications if applied broadly. |
.user.ini |
Host must permit per-directory PHP settings. | Site or directory scope. | Depends on the PHP handler’s configuration reload behavior. | May be disabled or restricted by shared hosting. |
Apache .htaccess |
Apache mod_php with permission to override PHP settings. |
Directory or virtual-host scope. | Apache reads the change according to its normal configuration behavior. | Generally not the method for PHP-FPM deployments. |
| Web-server request setting | Web-server or hosting administrator access. | Virtual host, server, or location scope. | Reload the relevant web server. | Must be high enough even if PHP allows the request. |
| Host support request | No server access required. | Whatever scope the provider supports. | Handled by the provider. | Provider may impose a maximum or decline the change. |
How do I verify that the new limit is active?
Verification must use the same web path as the upload. Check the web SAPI’s effective values, confirm the front-end request limit, and then inspect the application’s displayed maximum.
- Open a temporary PHP information page through the production virtual host and record the loaded configuration file and effective directive values.
- Confirm
upload_max_filesizeis at least the largest individual file andpost_max_sizeis higher than the complete request. - Confirm
max_input_time,memory_limit, andmax_file_uploadsmatch the workload. - Check the Apache, Nginx, or Lighttpd request-body directive, plus any proxy in front of it.
- Reload or restart services as required by the stack.
- Use the application’s own upload screen to confirm the reported limit and perform a normal upload.
- Delete the temporary PHP information page after verification.
What should I check when the value changed in CLI but not on the site?
This almost always indicates a SAPI or configuration-scope mismatch. The terminal may invoke one PHP version and configuration while the web server routes requests to another version, another PHP-FPM pool, or another php.ini.
Inspect the web SAPI’s Loaded Configuration File and effective values, then edit that configuration or ask the hosting administrator to do so. Restarting the command-line shell does not reload the PHP handler that serves web requests.
What is the complete troubleshooting checklist?
- Is the individual file larger than
upload_max_filesize? - Is the complete request larger than
post_max_size? - Is a web-server or proxy body-size limit lower than the PHP request limit?
- Did you edit the configuration used by the web SAPI rather than only the CLI configuration?
- Was the PHP handler or web server reloaded after the change?
- Could a slow connection be exceeding
max_input_timeor an upstream timeout? - Could processing be exhausting
memory_limit? - Does a multi-file form exceed
max_file_uploads? - In WordPress, is its reported value being reduced by the smaller PHP directive or an
upload_size_limitfilter?
Fix the first failing layer in that list, then verify the effective values again. The request must pass every layer before the application can process the file.
Frequently Asked Questions
Can I raise the upload limit without root or server access?
Sometimes. A host may allow .user.ini or Apache .htaccess overrides, but those mechanisms can be disabled and cannot bypass a provider’s server-wide cap. If the web SAPI values remain unchanged, contact the host administrator.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →How much headroom should I leave between upload_max_filesize and post_max_size?
There is no single PHP-prescribed percentage. Make the request limit larger than the largest file and account for multipart encoding, form fields, and any additional files sent in the same request.
Does max_file_uploads change the size allowed for one file?
No. It limits how many uploaded files PHP accepts in one request. The size of each file is still governed by upload_max_filesize, while the combined request is governed by post_max_size.
Why can a browser show a smaller limit than my PHP settings?
The application may calculate its own effective limit from several values. WordPress, for example, reports the smaller of upload_max_filesize and post_max_size, and a host or application filter can reduce it further.
Do I need to keep a phpinfo page online to monitor the limit?
No. Use it only as a temporary diagnostic page to identify the web SAPI configuration and effective directives, then remove it. Leaving configuration output publicly accessible exposes details that are not needed for normal uploads.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

