How to Increase WordPress Max Upload Size (6 Methods)

WordPress has no upload limit of its own. The “maximum upload file size” it shows comes from wp_max_upload_size(), which returns the smaller of two PHP settings: upload_max_filesize and post_max_size. To increase the WordPress max upload size, raise both values in your host’s PHP settings, php.ini, .user.ini, or .htaccess (whichever your server reads), then check that Nginx or Cloudflare isn’t capping the request lower.

PHP ships with upload_max_filesize at 2M and post_max_size at 8M, which is why so many fresh installs say “Maximum upload file size: 2 MB”. Below is how to find which layer is blocking you and the exact fix for each server setup. The core behavior described here was checked against the WordPress 7.1.4 source and the PHP manual.


Key Takeaways
  • WordPress shows the smaller of two PHP settings, upload_max_filesize and post_max_size. Raise both.
  • Where you change them depends on how PHP runs: host panel, php.ini, .user.ini (PHP-FPM), or .htaccess (Apache mod_php and LiteSpeed only).
  • Nginx (client_max_body_size, default 1 MB) and Cloudflare (100 MB on Free and Pro) can still block a file PHP would accept. That shows up as a 413 error.
  • WP_MEMORY_LIMIT in wp-config.php and ini_set() in functions.php do not raise the upload size.

Check Your Current Upload Limit

Go to Media > Add Media File. Under the drop zone WordPress prints “Maximum upload file size: X”, where X is the value of wp_max_upload_size().

WordPress Media uploader showing the current maximum file upload size

For the full picture, open Tools > Site Health > Info and expand Media Handling. It lists “Max size of post data allowed” (post_max_size), “Max size of an uploaded file” (upload_max_filesize), “Max effective file size” (the smaller of the two), and “Max simultaneous file uploads” (max_file_uploads). The Server section shows the PHP memory limit, time limit, and max input time.

Here is the core function, unchanged in WordPress 7.1.4:

function wp_max_upload_size() {
	$u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
	$p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );

	return apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );
}

Two things follow from it. memory_limit is not part of the number, so raising memory alone never changes it. And if upload_max_filesize is 256M but post_max_size is still 8M, WordPress shows 8 MB.


Which Error Are You Seeing?

The wording of the error tells you which layer rejected the file. These strings are copied from WordPress core, PHP, and the Nginx docs:

Error messageWhat rejected itFix
“file.mp4 exceeds the maximum upload size for this site.”The WordPress media uploader, in your browser, before sending the file. It compares the file to wp_max_upload_size().Raise upload_max_filesize and post_max_size. On multisite, also raise Max upload file size.
“The uploaded file exceeds the upload_max_filesize directive in php.ini.”PHP itself (UPLOAD_ERR_INI_SIZE). Common with uploaders that skip the media library check.Raise upload_max_filesize.
“413 Request Entity Too Large”The web server or proxy, before PHP runs: Nginx client_max_body_size or Cloudflare’s request body limit.Raise client_max_body_size (Method 5) or use a chunking plugin to stay under Cloudflare’s cap.
“This file is too big. Files must be less than 1500 KB in size.”Multisite’s fileupload_maxk network setting.Network Admin > Settings > Max upload file size.
“The link you followed has expired.” (theme or plugin zip upload)Usually post_max_size exceeded. PHP empties $_POST and $_FILES, so the security nonce is missing.Raise post_max_size above the zip size.
“The uploaded file could not be moved to wp-content/uploads/2026/11.”Not a size limit. PHP got the file but couldn’t write it to the uploads folder.Check folder permissions and disk space.
“Unexpected response from the server. The file may have been uploaded successfully.”A timeout or crash after upload, often image processing.Raise max_execution_time and memory; see below for large images.
Upload error messages and where each one comes from

If the last row appears on big photos, the cause is usually image resizing rather than upload size. Our guide to large image scaling in WordPress covers the memory WordPress needs to process them. For the permissions row, the file permissions section of our 500 error guide lists the usual 755/644 values.


Method 1: Use Your Host’s PHP Settings

The least technical option. Most control panels have a PHP settings screen: cPanel calls it MultiPHP INI Editor (or Select PHP Version > Options on CloudLinux), and Plesk has PHP Settings per domain. Set upload_max_filesize and post_max_size to the same value or make post_max_size slightly larger, then save.

The change survives WordPress updates and theme switches, and the panel writes the setting in the place your server actually reads. On managed WordPress hosts that don’t expose these values, a support ticket is the fastest route. Editing config files yourself can be overwritten by the platform.


Method 2: Edit php.ini (VPS or Dedicated Server)

If you control the server, edit the php.ini that your web PHP loads. The CLI and PHP-FPM often use different files, so php --ini in a terminal may point at the wrong one. A phpinfo() page shows “Loaded Configuration File” for the web process; our PHP version guide walks through creating one safely.

upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 300
max_input_time = 300

The PHP manual says post_max_size “must be larger than upload_max_filesize” for large uploads, and that memory_limit should generally be larger than post_max_size. Restart PHP so the change loads, for example sudo systemctl restart php8.3-fpm (match your PHP version), or restart Apache if PHP runs as a module.


Method 3: Create a .user.ini File (PHP-FPM / CGI Hosting)

Shared hosts that run PHP through PHP-FPM or FastCGI let you override settings per directory with a .user.ini file. Create it in the folder that holds wp-config.php:

upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 300
max_input_time = 300

Per the PHP manual, these files are “processed only by the CGI/FastCGI SAPI” and are re-read every 300 seconds by default (user_ini.cache_ttl). So wait up to five minutes before deciding it didn’t work. Only INI_PERDIR and INI_ALL settings are honored here, which covers everything above. max_file_uploads is INI_SYSTEM and can only be set in the main php.ini.

If .user.ini does nothing after five minutes, PHP is probably running as an Apache module or under LiteSpeed. Use Method 4 instead.


Method 4: Edit .htaccess (Apache mod_php or LiteSpeed Only)

Apache only understands php_value lines when PHP runs as an Apache module (mod_php). LiteSpeed’s docs say its lsphp “supports php_value and php_flag usage in .htaccess” as well. Add these lines to your .htaccess file, outside the # BEGIN WordPress / # END WordPress block so WordPress doesn’t overwrite them:

php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value memory_limit 512M
php_value max_execution_time 300
php_value max_input_time 300

On Apache with PHP-FPM, php_value is an unknown directive and the whole site returns a 500 Internal Server Error. If that happens, delete the lines over SFTP or your host’s file manager and use .user.ini (Method 3). Nginx never reads .htaccess at all.


Method 5: Raise client_max_body_size on Nginx

If you see 413 Request Entity Too Large, Nginx rejected the request before PHP saw it. The Nginx docs list the default as client_max_body_size 1m. Raise it in the http, server, or location block for your site, to match post_max_size:

server {
    # ...existing config...
    client_max_body_size 256M;
}

Test and reload with sudo nginx -t && sudo systemctl reload nginx. You still need Method 2 or 3 for the PHP side, since Nginx and PHP limits are separate.

Behind Cloudflare, there is one more cap. Its limits page lists a maximum request body of 100 MB on Free and Pro plans and 200 MB on Business, returning a 413 above that. No server setting gets around it, which is where chunked uploads (Method 6) help.


Method 6: Use the Big File Uploads Plugin

If you can’t edit server settings, Big File Uploads (formerly Tuxedo Big File Uploads) splits files into small chunks in the media uploader. Each chunk fits under the PHP and proxy limits, so the overall file can be much larger. As of November 2026 the plugin has 100,000+ active installs, was last updated in October 2026, and is tested up to WordPress 7.1.4.

Install it from Plugins > Add Plugin, then set the limit under Settings > Big File Uploads. You can set separate caps per file type and per user role.

Tuxedo Big File Uploads settings page
Tuxedo Big File Uploads settings

One limitation from the plugin’s own FAQ: it only covers the WordPress media uploader. Front-end upload fields in Gravity Forms, WPForms, or Forminator use their own upload process and still hit the PHP limit.


Multisite: The Network Upload Limit

On multisite, WordPress applies a second cap on top of PHP. Go to Network Admin > Settings and find Upload Settings:

  • Max upload file size: stored as the fileupload_maxk network option, in kilobytes. A new network starts at 1500 KB (about 1.5 MB).
  • Site upload space: the total storage quota per site (100 MB by default). When the quota check is on, WordPress also caps a single upload at the space the site has left.

In core, upload_size_limit_filter() hooks into wp_max_upload_size() and returns the smallest of the PHP limit, fileupload_maxk in bytes, and the remaining site space. So on multisite you raise the PHP values and this field, or the network setting keeps the limit low.


What Doesn’t Increase the Upload Size

Two fixes show up in older tutorials (including an earlier version of this post) that don’t change the upload limit:

WP_MEMORY_LIMIT in wp-config.php

Defining WP_MEMORY_LIMIT or WP_MAX_MEMORY_LIMIT in wp-config.php changes how much memory WordPress asks PHP for. It doesn’t touch upload_max_filesize or post_max_size, and those are the only two values wp_max_upload_size() reads. It can help when an upload completes but image processing runs out of memory, which is a different problem with its own fix: increasing the WordPress memory limit.

ini_set() in functions.php

upload_max_filesize and post_max_size are INI_PERDIR settings in the PHP directive list, so they can’t be changed at runtime. Tested on PHP 8.4.5: ini_set( 'upload_max_filesize', '256M' ) returns false and the value stays at 2M, while the same call for memory_limit succeeds. PHP also parses the upload before WordPress or your functions.php loads, so it would be too late anyway.

The upload_size_limit filter has a similar catch. It changes the number WordPress displays, but PHP still rejects anything over its own limits.


Which Method Should You Use?

Your setupWhere to raise the limit
Managed WordPress hostHost dashboard or a support ticket (Method 1)
Shared host with cPanel or PleskMultiPHP INI Editor / PHP Settings (Method 1), then .user.ini (Method 3)
Apache with mod_php, or LiteSpeed.htaccess (Method 4) or php.ini
Apache or Nginx with PHP-FPMphp.ini or .user.ini (Methods 2 and 3)
Nginx (any PHP setup)Also client_max_body_size (Method 5)
Behind Cloudflare, files over 100 MBChunked uploads with Big File Uploads (Method 6)
MultisitePHP values plus Network Admin > Settings > Max upload file size
No server access at allBig File Uploads (Method 6)
Where to raise the WordPress upload limit by hosting setup

Not sure how PHP runs on your host? the Server section of Site Health lists “PHP SAPI”: fpm-fcgi or cgi-fcgi means PHP-FPM/FastCGI, litespeed means LiteSpeed, and apache2handler means mod_php.


Frequently Asked Questions

What is the maximum upload size for WordPress?

There is no fixed WordPress maximum. WordPress shows the smaller of PHP’s upload_max_filesize and post_max_size, which are set by your host. With PHP’s defaults (2M and 8M) that works out to 2 MB. Multisite adds a network cap that starts at 1500 KB.

Why is my WordPress upload limit 2MB?

Your server is using PHP’s default upload_max_filesize of 2M. Raise it, along with post_max_size, using one of the methods above.

What’s the difference between upload_max_filesize and post_max_size?

upload_max_filesize caps a single file. post_max_size caps the whole request, including every file and form field sent with it. The PHP manual says post_max_size must be larger than upload_max_filesize for large uploads. If a request goes over post_max_size, PHP empties $_POST and $_FILES entirely.

Does WP_MEMORY_LIMIT increase the upload size?

No. WP_MEMORY_LIMIT sets PHP memory for WordPress. The upload limit comes only from upload_max_filesize and post_max_size.

I changed the settings but WordPress still shows the old number.

Check four things. PHP may need a restart (PHP-FPM or Apache). A .user.ini change can take up to 5 minutes to load. You may have edited a php.ini the web server doesn’t use, so compare against “Loaded Configuration File” in phpinfo(). On multisite, the network Max upload file size may be lower than PHP’s.

Should I just set the upload limit to 1GB and forget about it?

Usually not. Bigger limits mean longer requests that can hit timeouts, and anything over 100 MB fails behind Cloudflare’s Free and Pro plans regardless. Set the limit to the largest single file you actually upload plus a margin. For multi-GB video, use chunked uploads or host it on a video or object storage service and embed it.

Will any of this break my site?

The .htaccess method is the risky one. On servers where PHP doesn’t run as an Apache module, php_value lines cause an immediate 500 error. Removing them restores the site. A typo in php.ini or .user.ini usually just means the value doesn’t apply. If something does take the site down, our white screen of death guide covers recovery.


Wrapping Up

Raise upload_max_filesize and post_max_size together, in the file your PHP setup actually reads, then check the server and proxy layers if you get a 413. Use the error table above to tell which layer is rejecting the file before you start editing.

If you’re still stuck, your host’s support team can usually raise the limit in a few minutes. Let me know in the comments what worked (or didn’t).

Picture of Andy Feliciotti

Andy Feliciotti

Andy has been a full time WordPress developer for over 15 years. Through his years of experience has built 100s of sites and learned plenty of tricks along the way. Found this article helpful? Buy Me A Coffee

4 Responses

  1. Very Helpful Plugin, I am facing a big problem with this file size. Now I can upload a bigger file. Thanks for sharing.

  2. yeah! this plugin is awesome , When I didn’t know about it, faced this problem many times and after searching a bunch of blog and YouTube channel I found this plugin. Thanks for the article.

Leave a Reply

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

WordPress Tips Monthly
Get the latest from SmartWP to your inbox.