WordPress Large File Upload Failing - Increase Limits
You have a 500MB video file you need to upload to WordPress.
You click "Add Media".
You select your video.
It starts uploading. The progress bar moves. You watch it creep up to 30%, 40%, 50%...
Then it stops.
Error message: "The uploaded file exceeds the maximum upload size for this site."
Or: "The connection was reset. Upload failed."
Or: "Fatal error: Allowed memory size exhausted."
Your file never uploads. You can't add your video to WordPress.
A client called us frustrated. They were building an online course platform in WordPress. They needed to upload course videos (200-400MB each). WordPress kept rejecting every upload. They thought their hosting was broken.
It wasn't broken. WordPress and the server had upload limits. The files were hitting those limits and failing.
We increased the limits, and the uploads worked immediately.
It's one line of code in most cases. But if you don't know where to put it, you'll spend hours trying random solutions.
Here's exactly where to increase upload limits and why different methods work for different hosting setups.
Why WordPress Upload Limits Exist
Understanding the limits helps you increase the right ones.
- upload_max_filesize: PHP setting. Maximum single file size PHP will accept. Default 2MB.
- post_max_size: PHP setting. Maximum total data in a single POST request. Must be higher than upload_max_filesize. Default 8MB.
- max_execution_time: PHP setting. Time limit for script execution. Large uploads need more time. Default 30 seconds.
- memory_limit: PHP setting. RAM available to PHP scripts. Large uploads need more memory. Default 40MB.
- max_file_uploads: PHP setting. Maximum number of files per request. Default 20.
- Hosting plan limit: Your hosting provider may cap uploads. Shared hosting often limits to 100MB or 500MB.
- WordPress multisite limit: If you run multisite, each subsite may have separate limits.
When upload fails, it's hitting one of these limits. Usually upload_max_filesize or post_max_size.
Step 1: Identify Which Limit Is Being Hit
Different error messages mean different limits are the problem.
Check WordPress Media Settings
- Go to Settings > Media
- Look for "Maximum Upload File Size"
- This shows the current limit WordPress recognizes
- If it says "2MB" but you need to upload 50MB, limits need to be increased
Check error message you're getting
| Error Message | Likely Cause | Fix |
|---|---|---|
| "Exceeds maximum upload size" | upload_max_filesize or post_max_size too low | Increase both in php.ini or wp-config.php |
| "The connection was reset" | Script timed out during upload | Increase max_execution_time |
| "Fatal error: Allowed memory size exhausted" | Not enough PHP memory | Increase memory_limit |
| "413 Request Entity Too Large" | Server rejects POST request | Increase post_max_size and LimitRequestBody in server config |
| Upload hangs at 99% then fails | Usually max_execution_time or hosting limit | Increase max_execution_time and contact hosting about their limit |
Enable WordPress debug log to see exact error
- Open wp-config.php
- Add before "That's all, stop editing!":
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); - Save and upload
- Try uploading file
- Check wp-content/debug.log
- Look for error message that shows exactly what limit was exceeded
Step 2: Increase Limits via wp-config.php (Easiest for Most Hosts)
This works on most shared hosting. Add these lines to wp-config.php.
Connect via FTP
- Open FTP client
- Navigate to WordPress root directory
- Find wp-config.php
- Download it
- Open in text editor
Add upload limit settings
Find the line that says: /* That's all, stop editing! */
BEFORE that line, add:
// Increase upload limits
@ini_set( 'upload_max_filesize', '100M' );
@ini_set( 'post_max_size', '120M' );
@ini_set( 'max_execution_time', '300' );
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
What each does:
upload_max_filesize: '100M'ā Allow files up to 100MBpost_max_size: '120M'ā Must be higher than upload_max_filesize (POST request envelope)max_execution_time: '300'ā Allow 5 minutes for upload (300 seconds)WP_MEMORY_LIMIT: '256M'ā WordPress gets 256MB RAM for processingWP_MAX_MEMORY_LIMIT: '512M'ā Admin area can use up to 512MB RAM if needed
Save and upload
- Save the modified wp-config.php
- Upload it via FTP (replace the original)
- Go to WordPress Settings > Media
- Check "Maximum Upload File Size" ā it should now show higher limit (like 100MB)
- Try uploading large file
Adjust the values for your needs
These are starting points. Adjust based on your file sizes:
- Upload videos up to 500MB? Use: upload_max_filesize='500M', post_max_size='520M'
- Upload only images (10MB)? Use: upload_max_filesize='50M', post_max_size='60M'
- For slow connection? Increase max_execution_time to 600 (10 minutes)
- For very large files? Increase WP_MEMORY_LIMIT to '512M' or '1024M'
Step 3: Increase Limits via .htaccess (If wp-config.php Doesn't Work)
If wp-config.php modification didn't work, try .htaccess. This is more powerful but not all hosts allow it.
Connect via FTP
- Go to WordPress root directory
- Look for .htaccess file
- If you don't see it, enable "Show Hidden Files" in your FTP client
- Download .htaccess
- Open in text editor
Add upload limit directives
At the TOP of .htaccess file (before the WordPress rewrite rules), add:
php_value upload_max_filesize 100M
php_value post_max_size 120M
php_value max_execution_time 300
php_value memory_limit 256M
Save and upload
- Save modified .htaccess
- Upload via FTP
- Check WordPress Settings > Media for updated limit
- Try upload again
If you get 500 error
.htaccess method sometimes causes errors on certain hosts.
- This means your host doesn't allow php_value in .htaccess
- Delete the lines you added
- Use Step 2 (wp-config.php) or Step 4 (php.ini) instead
Step 4: Increase Limits via php.ini (Most Powerful)
If you have SSH access or your host provides php.ini editing, this is the most reliable method.
Via SSH command line
- Connect via SSH
- Navigate to your PHP configuration folder (usually public_html or your domain folder)
- Check if php.ini exists:
ls -la | grep php.ini
If php.ini doesn't exist, create it
cat > php.ini << 'EOF'
upload_max_filesize = 100M
post_max_size = 120M
max_execution_time = 300
max_input_time = 300
memory_limit = 256M
max_file_uploads = 20
EOF
If php.ini already exists, edit it
nano php.ini
Find these lines and update them:
upload_max_filesize = 100M
post_max_size = 120M
max_execution_time = 300
max_input_time = 300
memory_limit = 256M
max_file_uploads = 20
Save: Press Ctrl+X, then Y, then Enter
Verify changes took effect
php -i | grep upload_max_filesize
Should show: upload_max_filesize => 100M => 100M
Via hosting control panel
- Log into cPanel, Plesk, or control panel
- Look for "MultiPHP" or "PHP Configuration" or "PHP Settings"
- Find these settings:
- upload_max_filesize
- post_max_size
- max_execution_time
- memory_limit
- Change each to appropriate value
- Click "Save" or "Apply"
- Wait for changes to propagate (usually instant)
Step 5: Check Hosting Provider's Hard Limit
Some hosting providers cap uploads regardless of PHP settings.
Check your hosting plan
- Log into hosting control panel
- Look for "Account Details" or "Plan Information"
- Search for "upload limit" or "max file size"
- Some hosts cap at 128MB, 256MB, or 512MB per file
If hosting has a hard limit lower than you need
- Contact hosting support
- Ask: "Can you increase the upload file size limit for my account? I need to upload 500MB files."
- Most will increase it or move you to a plan that allows it
- Some may charge extra ($5-15/month) for higher limits
Hosting limits by tier
| Hosting Type | Typical Limit | Can Increase? |
|---|---|---|
| Shared hosting (budget) | 64-128MB | Usually no, or costs extra |
| Shared hosting (mid-tier) | 256-512MB | Yes, usually free |
| VPS hosting | No hard limit | Yes, unlimited (within disk space) |
| Dedicated server | No hard limit | Yes, unlimited (within disk space) |
Step 6: Increase Nginx Upload Limit (If Using Nginx)
If your server uses Nginx instead of Apache, the process is different.
Check if you're using Nginx or Apache
- Most shared hosting uses Apache
- Modern VPS and cloud hosting often use Nginx
- Check your hosting documentation or ask support which you use
For Nginx servers
Ask hosting to add this to your server block configuration:
client_max_body_size 100M;
This goes in the nginx.conf file (you probably can't edit this yourself on shared hosting).
Most Nginx hosting providers allow you to set this via control panel or per-domain settings.
- Log into hosting control panel
- Look for "Nginx Configuration" or domain settings
- Find "client_max_body_size" or "max upload size"
- Set to desired value (e.g., 100M)
- Save and reload Nginx
Step 7: For Very Large Files (1GB+) Use Chunked Upload Plugin
WordPress default upload can struggle with huge files. Use a plugin to split upload into chunks.
What is chunked upload?
- Large file is split into smaller pieces (e.g., 5MB chunks)
- Each chunk uploads separately
- Much more reliable for files over 500MB
- If upload fails halfway, it only loses one chunk, not the whole file
Install Big File Uploads plugin
- Go to Plugins > Add New
- Search "Big File Uploads" or "Resumable Uploads"
- Click "Install Now" then "Activate"
- Settings will add Resumable Uploads option to media uploader
- This plugin handles chunked upload automatically
Alternative plugins
- "WP Offload Media" ā Uploads directly to S3 (bypasses server limits)
- "Advanced YouTube Embed" ā If uploading video, embed from YouTube instead
- "Smush" ā Compresses images to reduce file size before upload
Step 8: Alternative: Upload via FTP Instead of WordPress Media
If you can't increase limits, upload files directly via FTP.
When to use FTP upload
- File is too large for WordPress uploader
- You've maxed out server limits
- You want to bypass WordPress processing overhead
How to upload via FTP
- Connect via FTP client
- Navigate to wp-content/uploads/
- Create a subfolder for your file (e.g., "videos" or "pdfs")
- Drag file into FTP uploader
- File uploads without hitting WordPress limits
Link to the file in WordPress
- In post/page editor, use raw HTML link:
<a href="https://yoursite.com/wp-content/uploads/videos/myfile.mp4">Download Video</a>- Or use a media shortcode plugin to browse FTP uploads
Step 9: Test Upload After Increasing Limits
Verify your changes worked.
Check WordPress recognizes new limit
- Go to Settings > Media
- Look for "Maximum Upload File Size"
- Should show your new limit (e.g., 100MB instead of 2MB)
- If still shows old limit, PHP changes haven't taken effect
- Try clearing browser cache or logging out/in
Test upload with progressively larger files
- Try uploading 10MB file first
- If successful, try 50MB
- If successful, try your target file size
- This helps identify where limit is being hit
If upload still fails
- Check debug.log for error message
- Note the exact error
- This tells you which limit is still too low
- Increase that specific limit further
Step 10: Optimize for Faster Uploads
Beyond just increasing limits, make uploads faster.
Compress files before uploading
- Videos: Use Handbrake to compress to H.264 (smaller file, same quality)
- Images: Use ImageOptim or TinyPNG to reduce size
- PDFs: Use online PDF compressor
- Archives: Use 7-Zip compression (smaller than ZIP)
Upload during off-peak hours
- Upload at night when server has fewer active users
- Faster connection speeds
- Less likely to timeout
Use CDN for media delivery
- Install Cloudflare or similar CDN
- CDN caches large files
- Reduces server load on repeat downloads
- Faster downloads for users
Store large files off-site
- Upload videos to YouTube, then embed
- Upload documents to Google Drive or Dropbox, then link
- This bypasses WordPress/server limits entirely
- Recommended for files over 1GB
Real-World Large File Upload Story
Scenario: A WordPress site for an online course platform needed to upload HD course videos. Files were 300-800MB each. Every upload failed with "Maximum file size exceeded" message. The site builder thought they needed to upgrade hosting.
What was happening:
- Hosting allowed 256MB uploads (their limit)
- WordPress was configured with 2MB default limit
- PHP memory_limit was 64MB (too low for processing large files)
- max_execution_time was 30 seconds (uploads would timeout)
- Multiple limits were hitting simultaneously
What we did:
- Added to wp-config.php:
- upload_max_filesize = 850M
- post_max_size = 900M
- max_execution_time = 600 (10 minutes)
- WP_MEMORY_LIMIT = 512M
- Contacted hosting (they raised their hard limit to 1GB)
- Tested with 300MB file (worked immediately)
- Tested with 800MB file (worked)
Result: Videos uploaded successfully. No hosting upgrade needed. Cost: $0. Time: 15 minutes.
The lesson: Multiple limits stack up. You need to increase all of them at once, not just one.
Upload Limits Reference Table
| Setting | What It Controls | Default | Recommended | Where to Set |
|---|---|---|---|---|
| upload_max_filesize | Max single file | 2M | 100M or higher | php.ini, .htaccess, wp-config.php |
| post_max_size | Max POST request | 8M | 120M (20% higher than upload_max_filesize) | php.ini, .htaccess, wp-config.php |
| max_execution_time | Script timeout | 30s | 300-600 seconds (5-10 minutes) | php.ini, .htaccess, wp-config.php |
| max_input_time | Input parsing timeout | 60s | 300-600 seconds | php.ini |
| memory_limit | PHP memory available | 40M or 64M | 256M minimum (512M better) | php.ini, wp-config.php |
| max_file_uploads | Files per request | 20 | 20 (usually fine) | php.ini |
| client_max_body_size | Nginx request size | 1M | 100M | Nginx config (ask hosting) |
Large File Upload Troubleshooting Checklist
Upload failing?
- ā Note exact error message you're getting
- ā Check WordPress Settings > Media for current limit
- ā Enable debug logging to see exact PHP error
- ā Increase upload_max_filesize in wp-config.php
- ā Increase post_max_size (must be higher than upload_max_filesize)
- ā Increase max_execution_time to 300+ seconds
- ā Increase WP_MEMORY_LIMIT to at least 256M
- ā If WordPress still shows old limit, clear cache or reload
- ā Try uploading smaller file first to test
- ā If still fails, try .htaccess method instead of wp-config
- ā If still fails, check if your hosting has a hard limit
- ā Contact hosting to ask for upload limit increase
- ā For Nginx servers, ask hosting to increase client_max_body_size
- ā For very large files (1GB+), use chunked upload plugin
- ā Alternative: Upload via FTP to wp-content/uploads/
- ā Alternative: Store files off-site (YouTube, Google Drive, etc.)
When to Contact Hosting Support
Contact them if:
- You increased limits in wp-config.php but WordPress still shows old limit
- You can't access or create php.ini file
- You see 500 error after modifying .htaccess
- You suspect hosting has a hard limit on uploads
- You're using Nginx and need to increase client_max_body_size
- You need to upgrade your hosting plan for higher limits
- Upload keeps timing out even after increasing max_execution_time
What to tell them:
"I need to upload files larger than [size] to WordPress. Can you tell me what the maximum upload size limit is for my account? If it's less than what I need, can you increase it?"
Most hosts can increase limits within 30 minutes.
The Real Talk
Hitting upload limits is one of the most frustrating WordPress problems because the error message is vague. "Maximum file size exceeded" ā but you don't know which limit. Is it PHP? WordPress? Hosting? Server?
And when you Google the error, you get 50 different solutions. Add code here. Modify that config. Reinstall WordPress. Upgrade hosting.
But the truth is simpler: PHP has limits. WordPress respects those limits. Hosting may add more limits on top. You need to increase all the relevant ones.
The good news? Once you know which settings control uploads, it's a 5-minute fix in most cases.
Add four lines to wp-config.php. Refresh the page. Upload your 500MB file. Done.
The bad news? Not every hosting setup is the same. Some hosts don't allow you to modify php.ini. Some restrict uploads despite your settings. Some use Nginx instead of Apache.
But even then, there's always a solution. The most common one is just asking your hosting provider to increase the limit for you. They can usually do it instantly.
You don't need to suffer through 2MB upload limits on a site meant to host videos. Increase the limits, test with a large file, and move on to what actually matters.
