How to Increase the WordPress Max Upload Size Safely
You try to upload a 40 MB match replay or a mod pack to your guild site and WordPress stops you with "The uploaded file exceeds the upload_max_filesize directive in php.ini." The Media screen says the limit is 2 MB, and you have no idea...

You try to upload a 40 MB match replay or a mod pack to your guild site and WordPress stops you with "The uploaded file exceeds the upload_max_filesize directive in php.ini." The Media screen says the limit is 2 MB, and you have no idea where that number lives. This guide shows how to raise the WordPress max upload size properly, which setting actually controls it on your host, and how to avoid the fixes that look right but change nothing.
Where the WordPress max upload size really comes from
WordPress does not set the limit itself. It reads it from PHP and from the web server, then shows you the smallest value. Go to Media, then Add New, and look under the upload box for the line "Maximum upload file size". For more detail, open Tools, then Site Health, then the Info tab, and expand the Server section. You will see the PHP values WordPress is working with.
Four settings decide whether a file gets through:
| Setting | What it controls | Sensible value for a fan site |
|---|---|---|
| upload_max_filesize | The largest single file PHP accepts | 64M |
| post_max_size | The whole request, including the file and form data | Slightly higher, such as 72M |
| memory_limit | Memory PHP can use while processing, including image resizing | 256M |
| max_execution_time | Seconds a script may run before PHP stops it | 120 |
The rule people miss is that post_max_size must be larger than upload_max_filesize. If you raise only the first and leave post_max_size at 8M, uploads above 8 MB still fail, sometimes with no error at all, just an empty screen and a file that never appears.
How to raise the limit, from easiest to most technical
Try these in order and stop as soon as the Media screen shows the new number. On most shared hosts the first method works and you never need to touch a file.
1. Your hosting control panel
In cPanel, open "MultiPHP INI Editor" or "Select PHP Version", then the Options tab. You will find upload_max_filesize, post_max_size and memory_limit as dropdowns. Plesk has the same settings under PHP Settings for the domain. Managed WordPress hosts often have a "PHP limits" page instead, or a support form where you request the change. Save, wait a minute, then reload Media.
2. A .user.ini file
If the panel has no option, create a plain text file called .user.ini in the same folder as wp-config.php and add four lines: upload_max_filesize = 64M, post_max_size = 72M, memory_limit = 256M and max_execution_time = 120. This works on hosts that run PHP as FPM or CGI, which is most of them now. PHP rereads the file every five minutes by default, so a slow change is normal.
3. php.ini on a VPS
If you run your own server, edit the php.ini used by PHP-FPM, not the command line one. Running phpinfo() or the php ini listing command on the server shows which file is loaded. Change the same values, then restart PHP-FPM so it picks them up.
4. .htaccess, only on the right setup
Lines like php_value upload_max_filesize 64M work only when Apache runs PHP as a module. On FPM, which is far more common today, the same lines cause a 500 Internal Server Error. If you add them and the site goes down, remove them over FTP and the site comes straight back. Our guide to fixing the WordPress white screen of death covers what to do if a bad edit takes the dashboard with it.
The fixes that look right but do nothing
A lot of tutorials tell you to install an "increase upload limit" plugin or to add a line to wp-config.php. I would skip both, and here is why.
A plugin runs inside PHP, after PHP has already decided how big a request may be. It can raise a value WordPress itself uses, but it cannot lift a ceiling set by the server above it. On most hosts the plugin's slider happily shows 128 MB while real uploads still fail at 32 MB. Worse, it adds one more plugin to keep updated for a job that takes two minutes in the control panel.
The wp-config.php line usually suggested is define('WP_MEMORY_LIMIT', '256M'). That raises the memory WordPress asks for, which can help when large images fail to resize, but it has no effect on upload_max_filesize at all. It treats a different problem.
I would also push back on the habit of setting everything to 1G "just in case". A huge limit invites members to upload full-length videos straight into the media library, which bloats your backups, slows every move to a new host and can eat a cheap plan's disk in a month. Pick a limit that matches the biggest file you actually need, then add a little headroom.
When the error is not PHP at all
If Site Health shows 64M but uploads of 20 MB still fail, the block is somewhere else in the chain.
- "413 Request Entity Too Large" comes from Nginx. Its client_max_body_size setting defaults to 1M. On your own server, set it to match post_max_size in the server block and reload Nginx. On shared hosting, ask support.
- Uploads cut off at exactly 100 MB often point to a proxy or CDN in front of the site. Cloudflare's free and Pro plans, for example, reject request bodies over 100 MB.
- "HTTP error" on large images usually means memory ran out while WordPress created thumbnails. Raise memory_limit, or resize the image to about 2,560 pixels wide before uploading, which is the size WordPress scales big images down to anyway.
- "Sorry, you are not allowed to upload this file type" has nothing to do with size. WordPress blocks some extensions, such as .zip for lower roles or unusual formats like .pak. Use a file manager or a download plugin for those.
A better home for big gaming files
Replays, mod packs and highlight videos are often better kept out of the media library entirely. Upload videos to a video platform and embed them, which also gives viewers adaptive streaming. Put mod files and large downloads on object storage or a dedicated download host and link to them. Your WordPress backups stay small, restores stay fast, and a proper backup routine does not choke on 10 GB of clips nobody watches after the first week.
A practical split for most community sites: images and PDFs in WordPress with a 64 MB limit, everything bigger hosted elsewhere.
Frequently asked questions
What is the default WordPress max upload size?
There is no WordPress default, because the limit comes from your host's PHP settings. Common values are 2 MB on older or very cheap hosts and 64 MB to 128 MB on modern ones. The Media upload screen always shows the current figure.
Why did my upload limit not change after editing php.ini?
You probably edited a php.ini that PHP is not using, or PHP-FPM has not been restarted. Check Site Health to see the live value. If you used .user.ini, wait up to five minutes, because PHP caches that file.
Is it safe to increase the upload size in WordPress?
Yes, within reason. A moderate limit like 64 MB is safe on almost any plan. The real risks of very large limits are disk space, slower backups and members using the media library as free video hosting.
More in WordPress
WordPress
How to Fix WP-Cron When Scheduled Posts Miss on a Fan Site
You schedule the patch notes summary for 03:00, right when the servers come back from maintenance.
WordPress
How to Migrate WordPress to a New Host Without Downtime
Your current host is slow, expensive or about to double its renewal price, and you want out.
WordPress
How to Set Up WordPress SMTP So Site Emails Arrive
A new member signs up for your guild site, waits for the welcome email, and nothing arrives.