WordPress Upload Max Filesize Error: Fix It Fast

WordPress says the uploaded file exceeds upload_max_filesize? Plan matching PHP limits with our free tool, or shrink the file and upload it in minutes.

Share this post
7 min read

Last updated December 2, 2026

You try to upload a file to WordPress and see “The uploaded file exceeds the upload_max_filesize directive in php.ini”. Or WordPress says the file is too large.

Your server has a size limit for uploads. The file is bigger than that limit, so PHP rejects it before WordPress even sees it.

This guide shows how to raise the limit correctly, with three values that must match. It also shows when shrinking the file is faster.

Key Takeaways

  • PHP’s default upload limit is 2 MB, and the default post size is 8 MB.
  • Raise upload_max_filesize, then set post_max_size larger than it.
  • Keep memory_limit larger than post_max_size, as the PHP manual suggests.
  • Media, Add New shows your current maximum upload file size.
  • For images and PDFs, compressing the file is often the quickest fix.
No content at risk. Changing upload limits only affects new uploads. Existing media stays exactly as it is.

Find Your Fix

Tell the finder what you are uploading and what you can change.

Upload size fix finder

Answer two questions. The finder suggests the fastest way to get your file uploaded. It runs in your browser only.

Digieh tool. Based on the PHP manual and WordPress.org docs, read December 2, 2026.

Plan Your New Upload Limits

Enter your file size. The planner writes three lines that follow the PHP manual’s order.

Upload limit planner

Enter the size of the file you need to upload. The planner writes three matching settings in the right order.

Your settings appear here.

Digieh tool. Runs in your browser only. Based on the PHP manual, read December 2, 2026.

Editor’s Note

This guide is accurate as of Digieh check. Many quick guides only raise upload_max_filesize. The PHP manual says post_max_size must be larger, and memory_limit should generally be larger again.

Spot an error in this article? Please contact us at support@digieh.com or read our Corrections Policy.

Which Three Settings Control Uploads?

SettingPHP defaultRule
upload_max_filesize2MLargest single file allowed
post_max_size8MMust be larger than upload_max_filesize
memory_limit128MGenerally larger than post_max_size

Source: PHP manual, Core php.ini directives, read December 2, 2026. Hosts often set their own values.

2 MBPHP’s built-in default for upload_max_filesize. Many hosts raise it, but some keep it low. Source: PHP manual.

How Do You Check Your Current Upload Limit?

  1. In WordPress, go to Media, Add New.
  2. Look for the line that says Maximum upload file size.
  3. For more detail, open Tools, Site Health, Info, Server.

The Media Add New documentation describes the upload screen. The Site Health documentation explains the server section.

Site Health lists the upload size, post size and PHP memory limit together. That makes mismatches easy to spot.

If the maximum shown is lower than the value you set, another setting is smaller. The lowest of upload size and post size usually wins.

Free updates

Join the Digieh list

Be the first to know when our weekly brief launches.

No spam. Unsubscribe anytime. Read our Privacy Policy.

How Do You Raise the Limit in Your Hosting Panel?

Most hosts offer a PHP settings page. It is the safest place to change limits.

  1. Log in to your hosting control panel.
  2. Find PHP configuration, PHP options or a similar page.
  3. Raise upload_max_filesize to the size you need.
  4. Set post_max_size higher than that, and memory_limit higher again.
  5. Save, then check Media, Add New.
Change one site at a time. Some panels apply settings per domain. Make sure you edit the right website.

How did you fix the upload size error?

  • Hosting panel PHP settings
  • A php.ini or .user.ini file
  • Compressing the file
  • Asked my host
  • Not sure

How Do You Raise the Limit With a File?

If your panel has no PHP page, a settings file in your main WordPress folder may work.

  • A .user.ini or php.ini file is read by many shared hosts.
  • An .htaccess file works only on Apache servers that run PHP as a module.
  • Changes may take a few minutes to apply on some hosts.

Use the planner above to write matching lines for either format. If nothing changes, your host does not read that file, so ask support.

Editing .htaccess incorrectly can break your site. Keep a copy, and see our WordPress 500 error guide if something goes wrong.

Should You Shrink the File Instead?

Often, yes. A smaller file uploads faster, loads faster for visitors and needs no server change.

  • Photos from phones and cameras are often several MB. Resize them to the width your theme uses.
  • Compress images with our free image compressor.
  • Save PDFs with lower image quality when printing is not needed.
  • Host long videos on a video platform and embed them.

Large media files also slow down backups and use up storage on your plan.

A good habit is to resize images on your computer before every upload. It keeps the media library tidy and the site fast.

Modern formats like WebP are often much smaller than older photo formats at similar quality. WordPress supports WebP uploads, so you can use them directly.

What Is the Biggest Image WordPress Should Get?

File size and pixel size are different limits. The upload limit is about megabytes, but WordPress also cares about pixels.

Since WordPress 5.3, images wider or taller than 2,560 pixels are scaled down automatically. WordPress keeps the original file and uses the scaled copy as the largest size.

That means uploading a huge 6,000 pixel photo gains you little. Resize it before upload and the file will likely fit your limit too.

Source: Make WordPress Core, handling of big images in 5.3.

Can You Allow Uploads of 500 MB or More?

Technically yes, if your host allows it. But very large uploads through the browser often fail for other reasons.

  • The upload can run past the server time limit.
  • A slow connection can drop before the file finishes.
  • Shared hosting plans may cap limits no matter what you set.

For files this big, upload with your host’s file manager or an SFTP app instead. Then add them to WordPress with a media import plugin if needed.

What About Theme and Plugin Zips?

Premium themes and big plugins can exceed upload limits. You have two options.

  1. Raise the limits as shown above, then upload the zip again.
  2. Or unzip it on your computer and upload the folder to wp-content, themes or plugins with your host’s file manager.

After a manual upload, go to Appearance, Themes or Plugins and activate it as usual.

Only upload themes and plugins from sources you trust. A file manager upload skips no security checks, so the risk is the same.

Why Did the Upload Fail With No Message?

Sometimes the upload simply stops or shows a vague HTTP error. Size limits are one cause, but not the only one.

  • The file is larger than post_max_size, so PHP drops the request silently.
  • The upload takes longer than the server time limit.
  • Memory runs out while WordPress makes image sizes. See our WordPress memory exhausted guide.
  • A security plugin blocks the file type.

Try a smaller test file first. If small files work, the problem is size or time, not permissions.

Try this today. Check Media, Add New now and note your maximum upload size. Plan big uploads around it.

Is the error about file type, not size? See our sorry, this file type is not permitted guide.

Test Yourself

You set upload_max_filesize to 64M. What should post_max_size be?

  1. Larger than 64M, such as 128M
  2. Smaller, such as 8M
  3. Exactly 2M

The PHP manual says post_max_size must be larger than upload_max_filesize to upload large files.

Where does WordPress show your current maximum upload size?

  1. Media, Add New
  2. Settings, Reading
  3. Appearance, Menus

The Media Add New screen shows the maximum upload file size.

Frequently Asked Questions

What is the default WordPress upload limit?

WordPress uses your server’s PHP limit. PHP’s own default is 2 MB, but hosts often set more.

Can a plugin raise the upload limit?

Only if your host allows it. The server PHP settings always decide.

Why does my limit not change after editing php.ini?

Your host may not read that file. Use the hosting panel or ask support.

Is a huge upload limit safe?

Keep it as low as you need. Very large limits use more server resources.

What is the best image size for WordPress?

Use the width your theme displays, and compress the file to keep it light.

Conclusion

Check your current maximum in Media, Add New. For images and PDFs, compress the file first. Otherwise raise upload_max_filesize, set post_max_size larger and memory_limit larger again, in your hosting panel or a settings file. If nothing changes, ask your host.

Editor’s Note

This guide is accurate as of December 2, 2026. We checked the PHP manual and WordPress.org documentation on that date.

Spot an error in this article? Please contact us at support@digieh.com or read our Corrections Policy.

Keep exploring

Your next read is waiting

Found this useful?

Share this post
Avatar photo

Syed Wasif Raza

Syed Wasif Raza is the founder and editor of Digieh. He writes about health, food, lifestyle, news and sports in plain, easy English. Every guide he publishes is checked against official sources such as government and health agency pages. Connect with him on LinkedIn.

Articles: 928

Leave a Reply

Your email address will not be published. Required fields are marked *