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.

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.
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.
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?
| Setting | PHP default | Rule |
|---|---|---|
| upload_max_filesize | 2M | Largest single file allowed |
| post_max_size | 8M | Must be larger than upload_max_filesize |
| memory_limit | 128M | Generally larger than post_max_size |
Source: PHP manual, Core php.ini directives, read December 2, 2026. Hosts often set their own values.
How Do You Check Your Current Upload Limit?
- In WordPress, go to Media, Add New.
- Look for the line that says Maximum upload file size.
- 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.
- Log in to your hosting control panel.
- Find PHP configuration, PHP options or a similar page.
- Raise upload_max_filesize to the size you need.
- Set post_max_size higher than that, and memory_limit higher again.
- Save, then check Media, Add New.
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.
- Raise the limits as shown above, then upload the zip again.
- 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.
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?
- Larger than 64M, such as 128M
- Smaller, such as 8M
- 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?
- Media, Add New
- Settings, Reading
- 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
1AI & TechPage With Redirect Status: When to Fix It7 min read
2Visas & PassportsDS-160 Photo Size: The Rule Most Guides Miss7 min read
3AI & TechPrinter Offline on Windows: Simple Fixes in Order7 min read
4AI & TechWordPress Memory Exhausted Error: Decode and Fix It7 min read
5AI & TechLaptop Black Screen but Power Is On: Fixes8 min read
6AI & TechWindows Update Error 0x80070005: Safe Fixes in Order7 min readFound this useful?












