WordPress shows “Maximum upload file size” on the Media › Add New screen, and when a file is bigger than that you get errors such as “exceeds the maximum upload size for this site”, a failed upload with no message, or a 413 “Request Entity Too Large” page. It usually bites when you upload a video, a large PDF, a theme or plugin zip, or a backup to restore.
The limit does not come from WordPress itself. It comes from PHP and, often, from the web server or CDN in front of it. This guide explains where each limit lives, how to raise it safely, and when it is better to keep the limit and upload the file another way.
The Short Answer
WordPress takes the smaller of two PHP settings, upload_max_filesize and post_max_size, as its maximum upload size, as the wp_max_upload_size() reference shows. PHP’s own defaults are only 2M and 8M according to the PHP manual, although most hosts set higher values.
To raise the limit, change both values (with post_max_size slightly larger) in your hosting panel, .user.ini or php.ini, then check Media › Add New. If you still get a 413 error, the web server or CDN has its own cap, such as Nginx client_max_body_size or Cloudflare’s plan limit. On multisite, the network setting “Max upload file size” also applies.
Where Upload Limits Come From
An upload passes through several layers, and the smallest limit wins. Knowing which layer stopped it saves a lot of guessing.
| Layer | Setting | Typical error when exceeded |
|---|---|---|
| PHP | upload_max_filesize | “The uploaded file exceeds the upload_max_filesize directive in php.ini” |
| PHP | post_max_size | Upload fails silently or with a generic HTTP error, because PHP discards the whole request |
| WordPress multisite | Network Settings › Max upload file size | “This file is too big” |
| Nginx | client_max_body_size | 413 Request Entity Too Large |
| Apache | LimitRequestBody | 413 Request Entity Too Large |
| CDN or proxy | Plan limit, for example 100 MB on Cloudflare Free and Pro | 413 from the CDN |
The PHP upload error reference explains why the second case is confusing: when a request is larger than post_max_size, PHP leaves $_POST and $_FILES empty, so WordPress has nothing to report.

Step by Step: How to Increase the Upload Limit
Step 1: Check the current limit
Go to Media › Add New and read the “Maximum upload file size” line. For more detail, open Tools › Site Health › Info › Media Handling and Server, which list the PHP upload and post size values. Write them down so you can confirm the change worked.
Step 2: Change the PHP values in your hosting panel
Most hosts let you change PHP settings without editing files. In cPanel, open MultiPHP INI Editor, choose the domain, and set upload_max_filesize and post_max_size. Other panels, such as Plesk, CloudPanel or managed hosting dashboards, have a similar PHP settings page. Use a value that fits your real need, such as 64M or 128M.
Step 3: Or use .user.ini or php.ini
If the panel has no option, add the settings to a file. On PHP-FPM or FastCGI hosting, create or edit a .user.ini file in the site root:
upload_max_filesize = 64M
post_max_size = 72M
memory_limit = 256M
max_execution_time = 300
PHP rereads .user.ini every few minutes, so wait before testing. On a VPS, put the same lines in the PHP-FPM php.ini and restart PHP. Keep post_max_size larger than upload_max_filesize, and raise the execution time for slow connections. These directives cannot be changed with ini_set() in a plugin or in wp-config.php.
Step 4: Raise the web server limit if you get a 413 error
A 413 error means the request was rejected before PHP saw it. On Nginx, add or raise client_max_body_size in the server block, for example client_max_body_size 72M;, then reload Nginx. The Nginx core module documentation explains the directive and confirms that requests above the limit get a 413. On Apache, check for a LimitRequestBody rule. On shared hosting, ask support to change it.
Step 5: Check your CDN or proxy
If the site runs behind a CDN, its limit applies too. Cloudflare documents a maximum request body of 100 MB on Free and Pro plans and returns a 413 above that. For larger files, upload through a hostname that bypasses the proxy, upload over SFTP, or use a chunked uploader. Our CDN setup tutorial explains how DNS-only and proxied records differ.
Step 6: Adjust the multisite limit
On WordPress multisite, go to Network Admin › Settings and change Max upload file size. This network option (fileupload_maxk, in kilobytes) is applied on top of the PHP limit, as the upload_size_limit_filter() reference shows, and the site’s remaining upload space also counts. See our multisite setup guide for the other network settings.
Step 7: Test, then consider other upload routes
Reload Media › Add New and confirm the new limit, then upload a test file. For very large files, such as multi-gigabyte videos or full-site backups, raising limits is often the wrong fix. Upload them over SFTP, host video on a video platform and embed it, or restore backups with a plugin that splits files into chunks, as covered in our guide to backing up a WordPress site.
Quick Diagnosis Table
| If you see this | Then |
|---|---|
| “exceeds the maximum upload size for this site” | Raise upload_max_filesize and post_max_size (steps 2 and 3) |
| Limit on Media › Add New did not change | Wait for .user.ini to reload, or the host does not read that file (step 3) |
| 413 Request Entity Too Large | Nginx, Apache or CDN limit (steps 4 and 5) |
| Upload fails with a generic HTTP error near the limit | post_max_size too small or upload timing out (step 3) |
| “This file is too big” on multisite | Network max upload size or site quota (step 6) |
| Huge photos upload but look smaller | WordPress scaling, not an upload limit (see FAQ) |
Common Mistakes
- Raising
upload_max_filesizebut leavingpost_max_sizelower, so the effective limit does not change. - Adding
@ini_set( 'upload_max_filesize', ... )towp-config.phporfunctions.php. PHP does not allow these values to be changed at runtime. - Using
php_valuelines in.htaccesson a server where PHP is not an Apache module, which causes a 500 error. - Setting enormous limits for the whole server. The PHP manual warns that very large values server-wide can increase security risks, so raise them only as far as needed.
- Forgetting the CDN. The PHP limit can be 512M while Cloudflare still stops anything over 100 MB.
- Uploading huge unoptimized images. Resize and compress them first, as in our guide to optimizing images for WordPress.
Frequently Asked Questions
What is a good maximum upload size for WordPress?
For most blogs, 32M to 64M covers images, PDFs and plugin or theme zips. Raise it further only if you regularly upload large media, and use other methods for very large files.
Why are my large photos scaled down after upload?
Since WordPress 5.3, images wider or taller than 2560 pixels are scaled down and the scaled copy is used as the largest size. You can change this with the big_image_size_threshold filter. This is separate from the upload size limit.
Can a plugin increase the upload limit?
A plugin cannot raise PHP’s upload_max_filesize or post_max_size, because those must be set before WordPress runs. Plugins that claim to do this usually edit .htaccess or .user.ini for you, or upload in chunks to stay under the limit.
Do I also need to raise the memory limit?
Not for the upload itself, but processing large images can use a lot of memory. If uploads succeed but image processing fails, see our guide to the allowed memory size exhausted error.
Why does uploading a theme or plugin zip fail?
Premium themes and plugins with demo content can be larger than the default limit. Raise the limit as above, or upload the unzipped folder to wp-content/themes or wp-content/plugins over SFTP.
The Bottom Line
WordPress uses the smaller of upload_max_filesize and post_max_size. Raise both in your hosting panel or .user.ini, check for web server and CDN limits when you see a 413, and adjust the network setting on multisite. Keep limits sensible, and move truly large files by SFTP or a dedicated service.
Sources & Further Reading
- WordPress Code Reference: wp_max_upload_size()
- WordPress Code Reference: upload_size_limit_filter()
- WordPress Code Reference: big_image_size_threshold filter
- PHP Manual: Description of core php.ini directives
- PHP Manual: File upload error messages explained
- PHP Manual: File upload common pitfalls
- PHP Manual: .user.ini files
- Nginx documentation: ngx_http_core_module (client_max_body_size)
- Cloudflare Support: Error 413
Articles are editorially reviewed by Jackober and factual claims are checked against cited sources.