
You pick a photo, click upload, and WordPress answers with a short refusal: the file exceeds the maximum upload size for the site. The photo itself is fine. Nothing is wrong with your media library. When wordpress image upload exceeds maximum file size blocks an upload, it means the file is bigger than a size limit set by your hosting server — and that limit is usually easy to raise.
This guide explains the limit in plain language, then works through 11 fixes in order, from the simplest step of making the image smaller to the deeper server settings. Every fix that touches a configuration file starts with a backup warning, and every method here uses official WordPress and hosting controls only. No nulled plugins, no risky shortcuts. If you are unsure about editing server files, start with Fixes 1 to 3, and ask your hosting provider for help with the rest — that is a normal request, and hosts handle it every day.
Table of Contents
- Why This Error Happens
- Quick Checks
- Diagnosing the Problem
- Fix 1: Compress and Resize the Image Before Uploading
- Fix 2: Confirm the Real Limit in WordPress
- Fix 3: Raise the Limit in Your Hosting Control Panel
- Fix 4: Raise the Limit With a php.ini or .user.ini File
- Fix 5: Raise the Limit With .htaccess on Apache Servers
- Fix 6: Understand What wp-config.php Can and Cannot Do
- Fix 7: Check the Multisite Network Upload Limit
- Fix 8: Check for a Plugin or Theme Limit
- Fix 9: Clear Caches and Re-check the Limit
- Fix 10: Check Disk Space and Uploads Folder Permissions
- Fix 11: Ask Your Hosting Provider About Server-Level Limits
- What to Avoid
- Frequently Asked Questions
- Conclusion
- Helpful Official Resources
Why This Error Happens
When you upload an image, WordPress hands the file to the server, and the server checks it against several size limits before WordPress ever sees it. If the file is bigger than any one of those limits, the upload is refused. The message you see comes from WordPress, but the limit itself usually lives in the server settings. These are the reasons that set it too low.
1. The PHP Upload Limit Is Set Too Low
WordPress runs on PHP, and PHP has a setting called upload_max_filesize that caps how large a single uploaded file may be. Many hosting accounts start with a low default, often just a few megabytes. A modern phone photo can easily be larger than that, so a perfectly ordinary image gets refused. Raising this one setting fixes most cases of wordpress image upload exceeds maximum file size, and Fixes 3 to 5 show the safe ways to raise it.
2. The Post Size Limit Is Smaller Than the File
PHP has a second setting, post_max_size, that caps the total size of the data sent with an upload request. If post_max_size is smaller than the file, the upload fails even when upload_max_filesize is generous. The two settings must be raised together, with post_max_size equal to or larger than upload_max_filesize. This is the reason some people raise one setting, see no change, and conclude that raising limits does not work.
3. The Memory Limit Is Too Low to Process the Image
After upload, WordPress opens the image to create smaller versions of it for thumbnails and different screen sizes. That work needs memory, and PHP caps it with memory_limit. A very large, high-resolution photo can exhaust the available memory during processing, so the upload fails even though the file itself was accepted. The memory limit should be larger than the post size limit, so WordPress has room to work.
4. A Server-Level Limit Overrides the PHP Settings
Some servers add their own cap on top of the PHP settings. A common example is the client_max_body_size setting on Nginx servers, which limits the size of any request the server will accept. When that cap is low, no PHP change will help, because the server refuses the request before PHP runs. Only the hosting provider can change a server-level cap, which is why Fix 11 exists.
5. A Multisite Network Has Its Own Upload Limit
On a WordPress multisite network, the network administrator sets a maximum upload file size in the Network Settings. That network limit applies to every site in the network, and it can be lower than the server limit. A single-site owner will never meet this cause, but a network site owner can raise every PHP setting and still be blocked by the network value.
6. A Plugin or Theme Lowers the Limit
Plugins and themes can change the upload limit with a filter, and some do so without telling you. A security plugin, a media plugin, or a theme’s functions file may set a low cap, or a plugin may add its own upload check. When wordpress image upload exceeds maximum file size appears only after a new plugin or theme was added, that addition is the first suspect.
Quick Checks
Two minutes before the deep fixes.
- Check the file size of the image on your computer — is it just over the limit, or far over it?
- Open Media, then Add New, in WordPress and read the “Maximum upload file size” line shown there.
- Try uploading a small image — if small images work, only the size limit is at fault.
- Compress the photo or resize it to the dimensions your site actually displays, then try again.
- Check whether the problem started after a hosting change, a new plugin, or a new theme.
- Take a backup before editing any configuration file — Fixes 4 to 6 all touch server files.
- Note the exact error message and the file size, so you can tell your host precisely what is happening.
Diagnosing the Problem
| Symptom | Cause | Go to Fix |
|---|---|---|
| One large photo fails, small ones work | File bigger than the upload limit | Fix 1 |
| Limit shown in WordPress is very low | PHP upload limit set too low | Fix 2 |
| Limit will not change after edits | Hosting panel setting overrides files | Fix 3 |
| Edits to settings have no effect | Wrong file, or server needs the change elsewhere | Fix 4 |
| Site shows an error after an edit | Bad .htaccess line on the wrong server type | Fix 5 |
| Memory error during image processing | Memory limit too low | Fix 6 |
| Limit low only on a network site | Multisite network upload limit | Fix 7 |
| Limit dropped after a new plugin | Plugin or theme lowering the limit | Fix 8 |
Fix 1: Compress and Resize the Image Before Uploading
The fastest fix needs no server changes at all. Most uploaded photos are far larger than any screen will ever show. A photo straight from a phone can be several thousand pixels wide, while your site displays it at a fraction of that size. Shrinking the image to the size your site actually uses usually brings it under the limit, and it also makes your pages load faster.
- Check the dimensions your site displays: a full-width blog image rarely needs to be wider than 1920 pixels.
- Resize the photo to that width using your computer’s built-in photo editor or a reputable image tool.
- Compress the resized photo to a reasonable quality — a JPEG at good quality is far smaller than the original with no visible difference on screen.
- Check the new file size on your computer and confirm it is under the limit shown in Media, then Add New.
- Upload the resized image and confirm it succeeds.
- If it still fails, resize a little further or compress a little more, and try again.
- Keep the original full-size photo saved on your computer, so you always have it if you need a larger version later.
This fix is good practice even when the upload succeeds. Large images slow down every page they appear on, and visitors on mobile connections feel that slowness most. Resizing before upload is the one fix in this guide that improves your site whether or not the limit was the problem. If the image must stay large — for example, a print-quality photo you offer as a download — then the limit itself must be raised, and the fixes that follow show how.
Fix 2: Confirm the Real Limit in WordPress
Before changing any setting, find out exactly what the current limit is. Guessing leads to edits that change nothing, because you cannot tell whether a change worked unless you know the starting number.

- In your WordPress dashboard, go to Media, then Add New.
- Read the line under the upload box: it states the maximum upload file size for your site.
- Write that number down.
- Go to Tools, then Site Health, then the Info tab.
- Expand the Server section and note the PHP version and the upload-related values shown there.
- Compare the number in Media with your image’s file size — the gap tells you how much the limit must rise.
- After every later fix in this guide, come back to Media, then Add New, and check whether the number has changed.
Site Health is your measuring tool for this whole guide. Each fix either moves the number in Media, then Add New, or it does not — and that result tells you whether the fix took effect. Do not rely on a single test upload alone, because caching can make an old limit appear to persist. The displayed limit, plus a test upload, together give you a trustworthy answer. If uploads fail with a different message than the size error, our guide to WordPress image upload failed covers the wider upload faults, including permission and HTTP errors that look similar but need different fixes.
Fix 3: Raise the Limit in Your Hosting Control Panel
Most hosting providers let you change the PHP upload settings from the control panel, with no file editing at all. This is the safest way to raise the limit, because the panel writes the change in the place your server actually reads.
- Sign in to your hosting control panel.
- Look for a PHP settings, PHP options, or PHP configuration section — the name varies by host.
- Find upload_max_filesize and raise it to a sensible value, such as 64M.
- Find post_max_size and set it to the same value or larger, such as 64M or 128M.
- Find memory_limit and set it larger than post_max_size, such as 256M.
- Save the settings and wait a minute for the change to take effect.
- Go back to WordPress, open Media, then Add New, and confirm the maximum upload file size has risen.
- Upload your image and confirm it succeeds.
The three values work as a set, and raising only one of them often changes nothing. Think of them as three gates in a row: the file must pass the upload gate, the post gate, and the memory gate. Raise all three, in the order above, and the file gets through. If your control panel has no PHP settings section, your host may keep those settings in a different place, or may only change them on request — Fix 11 covers asking your host, and Fixes 4 and 5 cover the file-based routes for hosts that allow them. When wordpress image upload exceeds maximum file size persists after a control panel change, check that you edited the PHP version your site actually uses: hosts with several PHP versions installed apply settings per version.
Fix 4: Raise the Limit With a php.ini or .user.ini File
If your host allows it, a small settings file in your site’s folder can raise the PHP limits. This fix edits a server file, so back up first. One wrong character in the wrong file can take a site down, and a backup is what turns a mistake into a minor delay.
- Take a full backup of your site, including files and database, before you start.
- Connect to your site with your host’s file manager or a file transfer program.
- Look in your site’s main folder for an existing php.ini or .user.ini file.
- If one exists, download a copy to your computer as a safety backup, then open it for editing.
- If none exists, create a new plain text file named .user.ini in the site’s main folder.
- Add or change these three lines, using values that suit your needs:
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 256M
- Save the file and upload it if you edited it on your computer.
- Wait a few minutes — some servers only re-read these files every few minutes — then check Media, then Add New, in WordPress.
- If the limit has not changed, your server may read PHP settings from elsewhere. Remove the file you created, restore the backup copy if you edited an existing file, and move on to Fix 5 or Fix 11.
Do not raise the values to extreme numbers. A 64M upload limit is generous for images, and a 256M memory limit is comfortable for processing them. Enormous limits invite abuse and can let a single bad upload exhaust server resources. Also note that .user.ini files are only read by some server setups, and php.ini files in the site folder are only honoured by others — that is why this fix includes a clear undo step. If the limit does not move, the file route is not the right route for your host, and no amount of editing the same file will change that.
Fix 5: Raise the Limit With .htaccess on Apache Servers
On servers running Apache, the .htaccess file can set PHP values. This fix is powerful and risky in equal measure: a single bad line in .htaccess can break the whole site with a server error. Back up the file first, and use this fix only if you know your server runs Apache.
- Take a full backup of your site before you start.
- Connect with your host’s file manager or a file transfer program.
- Find the .htaccess file in your site’s main folder — it may be hidden, so enable showing hidden files.
- Download a copy of .htaccess to your computer before editing anything.
- Open .htaccess and add these lines at the end of the file:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value memory_limit 256M
- Save the file and check your site immediately in a browser.
- If the site loads normally, check Media, then Add New, and confirm the limit has risen.
- If the site shows a server error, restore your backup copy of .htaccess at once — your server does not accept php_value lines, and the fix is not suitable for your setup.
- If the site loads but the limit has not changed, remove the lines you added and move on to Fix 11.
The error in step 8 is the reason for the backup. Servers running PHP in certain modes reject php_value lines outright, and the whole site fails until those lines are removed. That failure is not damage — restoring the backup copy brings the site straight back. Never leave a broken .htaccess in place while you search for another answer. Restore first, then continue with the next fix. And never edit .htaccess on a live site without a backup copy on your own computer: the file manager’s undo, if it has one, is not a substitute for a real copy.
Fix 6: Understand What wp-config.php Can and Cannot Do
Many guides tell you to raise the upload limit in wp-config.php. The honest truth is more limited: wp-config.php cannot directly raise the PHP upload limit, because PHP reads its upload settings before WordPress runs. What wp-config.php can do is raise WordPress’s memory limit, which helps when image processing runs out of memory. Knowing the difference saves you from edits that cannot work.
- Take a full backup of your site before editing wp-config.php.
- Connect with your host’s file manager or a file transfer program.
- Find wp-config.php in your site’s main folder and download a copy to your computer.
- Open wp-config.php and look for a line defining WP_MEMORY_LIMIT.
- If the line exists, raise its value; if it does not exist, add this line above the line that says “stop editing”:
define( 'WP_MEMORY_LIMIT', '256M' );
- Save the file and check your site loads normally.
- Check Media, then Add New — understand that this change may not move the displayed upload limit, because it raises memory, not the upload cap.
- Test uploading a large image: if processing was the bottleneck, the upload may now succeed even though the displayed limit is unchanged.
- If nothing changes, leave the memory line in place if your site needs the memory, and return to Fixes 3 to 5 for the upload cap itself.
Be wary of any guide that promises a wp-config.php line will raise the upload limit itself. The commonly copied lines that try to set the upload size from wp-config.php do not take effect on most servers, because the upload settings are locked before WordPress code runs. The memory line above is the genuine, documented use of wp-config.php in this area, and it is worth setting — but it is a memory fix, not an upload-limit fix. Treating it as anything else leads to frustration and wasted edits.
Fix 7: Check the Multisite Network Upload Limit
If your site is part of a WordPress multisite network, the network settings hold a separate upload limit that overrides everything else for sites in the network. Single-site owners can skip this fix — the setting does not exist on their sites.
- Sign in as the network administrator.
- Go to My Sites, then Network Admin, then Settings.
- Find the “Max upload file size” field in the Upload Settings section.
- Note the current value — it is measured in kilobytes, so 10240 means 10 megabytes.
- Raise the value to suit your needs, for example 65536 for 64 megabytes.
- Save the network settings.
- Switch to the affected site, open Media, then Add New, and confirm the displayed limit has risen.
- Upload the image and confirm it succeeds.
- If you are not the network administrator, ask the network administrator to raise the value — site administrators cannot change it themselves.
The kilobytes detail in step 4 catches many people out. Entering 64 in that field sets a 64-kilobyte limit, which blocks almost every photo. Always convert: multiply the megabytes you want by 1024. A network limit is also the explanation when one site on a network uploads fine and another does not, if the sites have different settings — though usually the network value applies evenly, so check it before assuming a single site is at fault. If wordpress image upload exceeds maximum file size appears only on network sites and never on single sites you manage, this fix is almost certainly the answer.
Fix 8: Check for a Plugin or Theme Limit
A plugin or theme can lower the upload limit silently. Security plugins, media plugins, and custom theme code can all add a filter that caps upload sizes, and the cap stays in place until the plugin or code is changed.

- Think back: did the problem start after installing or updating a plugin or theme?
- Go to Plugins, then Installed Plugins, and note which plugins deal with media, uploads, security, or file handling.
- Deactivate the most likely suspect first — one plugin at a time, not all at once.
- After each deactivation, check Media, then Add New, to see whether the displayed limit has risen.
- If the limit rises, you have found the plugin. Check its settings for an upload size option, or contact the plugin’s support for advice.
- If no plugin changes the limit, switch briefly to a default WordPress theme on a staging copy of your site, or during a quiet period, and check the limit again.
- If the theme is the cause, check the theme’s settings and any custom code added to the theme for an upload size filter.
- Reactivate everything you deactivated, except the item you proved was at fault.
Test one change at a time. Deactivating everything at once tells you the cause is somewhere in the pile, but not which item, and you end up testing them all again anyway. The same patient approach applies to themes: a theme switch on a live site changes how visitors see the site, so use a staging copy when your host provides one. If plugin conflicts are a recurring headache, our guide to WordPress plugin conflict fix explains the full isolation method, including how to test safely without breaking the live site for visitors.
Fix 9: Clear Caches and Re-check the Limit
Caching can show you an old limit long after the real limit has risen. Your browser, a caching plugin, and your host’s server cache can each hold an old copy of the upload page or the settings that feed it.
- Clear your browser cache, or open WordPress in a private browsing window.
- In WordPress, open your caching plugin’s settings and purge or clear all caches.
- If your host provides a server cache control in the hosting panel, purge that cache too.
- If you use a content delivery network, purge its cache for your site.
- Wait a minute, then open Media, then Add New, and read the displayed limit again.
- Upload a test image to confirm the real behaviour, not just the displayed number.
- If the limit is still wrong, repeat the check after ten minutes — some server caches take time to clear fully.
Cache staleness is the most embarrassing cause in this guide, because the fix already worked and nobody could see it. Every settings change in Fixes 3 to 8 deserves a cache purge and a fresh check before you declare it a failure. If caching problems keep returning in other areas too, our guide to WordPress cache not clearing covers the layers of cache that can hold old content, and how to purge each one properly.
Fix 10: Check Disk Space and Uploads Folder Permissions
An upload needs somewhere to go. If your hosting account is out of disk space, or if WordPress cannot write to the uploads folder, uploads fail — sometimes with the size message, sometimes with a vaguer error. Checking both takes a few minutes and rules out a whole class of faults.
- Sign in to your hosting control panel and check your disk space usage.
- If the account is nearly full, delete old backups, unused files, or oversized media you no longer need.
- In WordPress, go to Tools, then Site Health, and read any warnings about the uploads folder.
- Connect with your host’s file manager and open the wp-content folder.
- Check that the uploads folder exists and that WordPress can write to it — your host’s file manager shows the permissions for each folder.
- If the uploads folder is missing or unwritable, ask your host to restore the correct folder and permissions — do not set wide-open permissions yourself.
- After any change, upload a test image and confirm it appears in the Media Library.
Permissions are a host-level matter, and guessing at them can make a site less secure. The safe move is to report what you found — missing folder, unwritable folder, full disk — and let your host apply the correct fix. If the Media Library itself will not load or shows broken images, our guide to WordPress media library not loading covers the library-side faults that often share these same underlying causes.
Fix 11: Ask Your Hosting Provider About Server-Level Limits
When every setting you can reach is raised and the limit still will not move, a server-level cap is in control. Only your hosting provider can change it. This is a normal support request, not an admission of defeat — hosts set these caps deliberately, and they raise them routinely.

- Write down the current displayed limit from Media, then Add New.
- Write down the file size you need to upload, and the values you already raised.
- Note your PHP version from Tools, then Site Health, then Info.
- Contact your hosting provider’s support and describe the problem in one clear message: the error, the limit shown, the file size, and the settings you changed.
- Ask specifically whether a server-level request size cap applies to your account, and whether it can be raised.
- Ask whether your account’s PHP settings are managed only from the control panel, so you know where future changes belong.
- Apply whatever change the host makes, then check Media, then Add New, and test the upload.
- Keep a note of the host’s answer — it tells you where the real control lives for next time.
A precise request gets a faster answer than a vague one. Support teams handle dozens of upload-limit requests, and the ones with exact numbers, exact settings, and exact error messages are resolved first. If your host says the cap cannot be raised on your current plan, that is useful information too: it tells you the honest choice is between smaller images and a different plan, rather than more edits that cannot work. Either way, you will have a definite answer instead of another round of guessing.

What to Avoid
- Do not edit php.ini, .htaccess, or wp-config.php without a backup — one bad line can take the site down.
- Do not set enormous limits — 64M for uploads and 256M for memory are generous for images.
- Do not use nulled plugins or themes to raise limits — they are a security risk, and official methods exist.
- Do not leave a broken .htaccess in place — restore your backup copy at once if the site shows a server error.
- Do not raise only upload_max_filesize and declare the fix failed — post_max_size and memory_limit must rise with it.
- Do not set wide-open folder permissions to force uploads through — ask your host for the correct permissions.
- Do not trust a single test upload after a settings change — purge caches and re-check the displayed limit too.
- Do not enter megabytes into the multisite field — it is measured in kilobytes.
Frequently Asked Questions
What is the maximum upload file size in WordPress?
There is no single WordPress-wide number. The limit is set by your hosting server’s PHP settings, and it varies by host. Many hosts start with a low default of just a few megabytes. You can see your site’s current limit in Media, then Add New, in the WordPress dashboard. Fixes 3 to 5 show how to raise it.
Why does WordPress say my image exceeds the maximum file size when the photo looks normal?
A normal-looking photo from a modern phone can be several megabytes, which is larger than many hosts’ default limits. The error means the file is bigger than the server’s cap, not that the photo is damaged. Compressing and resizing the image with Fix 1 usually solves it without any server change.
Can I raise the upload limit from wp-config.php?
Not directly. The PHP upload settings are read before WordPress runs, so wp-config.php cannot change them. What wp-config.php can do is raise WordPress’s memory limit, which helps when image processing runs out of memory. Fix 6 explains the difference honestly, so you do not waste time on edits that cannot work.
Will raising the upload limit slow down my site?
Raising the limit itself does not slow anything down. What slows a site is uploading huge, uncompressed images and displaying them at full size. Raise the limit if you need it, but still resize and compress images before upload, as in Fix 1, so your pages stay fast.
Why did the limit not change after I edited the settings file?
The usual reasons are editing the wrong file, editing the PHP version your site does not use, a server that reads settings from elsewhere, or a cache showing the old value. Re-check with Fix 2, purge caches with Fix 9, and if the number still will not move, ask your host with Fix 11 — a server-level cap may be in control.
Is it safe to edit .htaccess to raise the limit?
It is safe only with a backup and only on Apache servers. A bad line in .htaccess can break the whole site, which is why Fix 5 starts with a backup and includes an immediate restore step. If you are unsure whether your server runs Apache, use the hosting control panel method in Fix 3, or ask your host.
Conclusion
When wordpress image upload exceeds maximum file size blocks a photo, start with the image itself: resize and compress it to the size your site displays. If the file must stay large, raise the three PHP settings together through your hosting control panel, back up before any file edit, and purge caches before judging whether a change worked. And when the limit will not move no matter what you change, ask your host — a server-level cap is a support request, not a failure. Your photos belong on your site, and one of these 11 fixes will get them there.

[…] browser side. For images that fail because they exceed the size limit WordPress shows, our guide to WordPress image upload exceeds maximum file size covers that […]
[…] be wrong, and Fix 5 asks your host to check it. For images that fail for size reasons, our guide to WordPress image upload exceeds maximum file size covers that […]