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

  1. Go to Settings > Media
  2. Look for "Maximum Upload File Size"
  3. This shows the current limit WordPress recognizes
  4. 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

  1. Open wp-config.php
  2. Add before "That's all, stop editing!":
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
  3. Save and upload
  4. Try uploading file
  5. Check wp-content/debug.log
  6. 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

  1. Open FTP client
  2. Navigate to WordPress root directory
  3. Find wp-config.php
  4. Download it
  5. 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 100MB
  • post_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 processing
  • WP_MAX_MEMORY_LIMIT: '512M' — Admin area can use up to 512MB RAM if needed

Save and upload

  1. Save the modified wp-config.php
  2. Upload it via FTP (replace the original)
  3. Go to WordPress Settings > Media
  4. Check "Maximum Upload File Size" — it should now show higher limit (like 100MB)
  5. 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

  1. Go to WordPress root directory
  2. Look for .htaccess file
  3. If you don't see it, enable "Show Hidden Files" in your FTP client
  4. Download .htaccess
  5. 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

  1. Save modified .htaccess
  2. Upload via FTP
  3. Check WordPress Settings > Media for updated limit
  4. Try upload again

If you get 500 error

.htaccess method sometimes causes errors on certain hosts.

  1. This means your host doesn't allow php_value in .htaccess
  2. Delete the lines you added
  3. 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

  1. Connect via SSH
  2. Navigate to your PHP configuration folder (usually public_html or your domain folder)
  3. 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

  1. Log into cPanel, Plesk, or control panel
  2. Look for "MultiPHP" or "PHP Configuration" or "PHP Settings"
  3. Find these settings:
    • upload_max_filesize
    • post_max_size
    • max_execution_time
    • memory_limit
  4. Change each to appropriate value
  5. Click "Save" or "Apply"
  6. 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

  1. Log into hosting control panel
  2. Look for "Account Details" or "Plan Information"
  3. Search for "upload limit" or "max file size"
  4. Some hosts cap at 128MB, 256MB, or 512MB per file

If hosting has a hard limit lower than you need

  1. Contact hosting support
  2. Ask: "Can you increase the upload file size limit for my account? I need to upload 500MB files."
  3. Most will increase it or move you to a plan that allows it
  4. 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

  1. Most shared hosting uses Apache
  2. Modern VPS and cloud hosting often use Nginx
  3. 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.

  1. Log into hosting control panel
  2. Look for "Nginx Configuration" or domain settings
  3. Find "client_max_body_size" or "max upload size"
  4. Set to desired value (e.g., 100M)
  5. 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

  1. Go to Plugins > Add New
  2. Search "Big File Uploads" or "Resumable Uploads"
  3. Click "Install Now" then "Activate"
  4. Settings will add Resumable Uploads option to media uploader
  5. 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

  1. Connect via FTP client
  2. Navigate to wp-content/uploads/
  3. Create a subfolder for your file (e.g., "videos" or "pdfs")
  4. Drag file into FTP uploader
  5. File uploads without hitting WordPress limits

Link to the file in WordPress

  1. In post/page editor, use raw HTML link:
  2. <a href="https://yoursite.com/wp-content/uploads/videos/myfile.mp4">Download Video</a>
  3. 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

  1. Go to Settings > Media
  2. Look for "Maximum Upload File Size"
  3. Should show your new limit (e.g., 100MB instead of 2MB)
  4. If still shows old limit, PHP changes haven't taken effect
  5. Try clearing browser cache or logging out/in

Test upload with progressively larger files

  1. Try uploading 10MB file first
  2. If successful, try 50MB
  3. If successful, try your target file size
  4. This helps identify where limit is being hit

If upload still fails

  1. Check debug.log for error message
  2. Note the exact error
  3. This tells you which limit is still too low
  4. 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

  1. Install Cloudflare or similar CDN
  2. CDN caches large files
  3. Reduces server load on repeat downloads
  4. Faster downloads for users

Store large files off-site

  1. Upload videos to YouTube, then embed
  2. Upload documents to Google Drive or Dropbox, then link
  3. This bypasses WordPress/server limits entirely
  4. 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:

  1. Hosting allowed 256MB uploads (their limit)
  2. WordPress was configured with 2MB default limit
  3. PHP memory_limit was 64MB (too low for processing large files)
  4. max_execution_time was 30 seconds (uploads would timeout)
  5. Multiple limits were hitting simultaneously

What we did:

  1. Added to wp-config.php:
    • upload_max_filesize = 850M
    • post_max_size = 900M
    • max_execution_time = 600 (10 minutes)
    • WP_MEMORY_LIMIT = 512M
  2. Contacted hosting (they raised their hard limit to 1GB)
  3. Tested with 300MB file (worked immediately)
  4. 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.