Skip to content
WordPress Support

WordPress Maximum Upload Size: How to Raise It Safely

The upload limit in WordPress is set by the server, not WordPress. Here is how to see the current limit, raise it in the right place, and avoid the .htaccess change that breaks sites.

A laptop with code open on a white desk
9 sections · 7 min read
In this article · 9 sections

The file is ready: a product video, a brochure PDF, a premium theme you just bought. You choose it in WordPress and get a polite refusal instead: “yourfile.zip exceeds the maximum upload size for this site.” Under the upload box, WordPress has been quietly telling you the number all along, in a line that reads something like “Maximum upload file size: 2 MB.”

This is not a fault in WordPress. It is a ceiling set by the server, and WordPress is simply reporting it. Raising it is usually a five-minute job, as long as you change the setting in the right place. Change it in the wrong place and you can take the whole site down, which is why this post spends as much time on where as on how.

The messages you might see

The limit shows up in slightly different words depending on where you upload:

  • Media Library: “exceeds the maximum upload size for this site,” shown next to the file name.
  • Plugin or theme upload: a message saying the file exceeds the upload_max_filesize directive in php.ini. This one names the PHP setting directly, which is helpful.
  • A plain page saying “413 Request Entity Too Large”: this comes from the web server, often Nginx, before PHP even sees the file.
  • Nothing at all: sometimes a large upload just fails silently or returns you to an empty screen. That is often a different PHP limit, explained below.

Which settings control the limit

Three PHP settings work together, and the smallest one wins:

Setting What it controls
upload_max_filesize The largest single file PHP will accept.
post_max_size The largest whole request, including the file and the form around it. It needs to be equal to or bigger than upload_max_filesize.
memory_limit How much memory a PHP process may use. Large images in particular need room to be processed after they arrive.

Two more settings matter for big files on slow connections: max_execution_time and max_input_time. If an upload takes longer than these allow, it can stop part way with no clear message.

On top of PHP, the web server can have its own cap. Nginx uses client_max_body_size, and that is where the 413 page comes from. On a WordPress Multisite network there is also a “Max upload file size” field in Network Admin, under Settings, which applies on top of everything else.

First, check what you have now

Open the Site Health screen from the Tools menu, choose its Info tab, and expand the section headed Server. You will see the PHP version, memory limit, upload max filesize, and max post size. Write those numbers down before you change anything. If something goes wrong later, you will know exactly what to put back.

While you are making changes, keep a recent backup of the site and a copy of any file you are about to edit, so a mistake can be undone in seconds rather than hours.

Ways to raise the limit, safest first

1. Use your hosting control panel

This is the right answer on most hosting. In cPanel, look for “MultiPHP INI Editor” or “Select PHP Version” and its options tab. In Plesk, open the domain, then PHP Settings. Many managed WordPress hosts have their own PHP settings screen. Set upload_max_filesize and post_max_size to what you need, save, and reload Site Health to confirm the new values took effect.

Pick a sensible number. If your largest realistic upload is a 40 MB video, 64 MB is plenty. Setting it to several gigabytes “just in case” invites accidental huge uploads that fill your storage and backups.

2. Ask your host

If the panel does not offer these settings, a support ticket asking to raise upload_max_filesize and post_max_size to a specific value is a normal request. Some cheaper plans cap the limit and will not raise it. That is worth knowing, because it may decide whether you upload large files to WordPress at all. Our hosting and domain support covers this sort of conversation with a host when you would rather not have it yourself.

3. A php.ini or .user.ini file

On hosts where PHP runs through PHP-FPM or CGI, which is most of them today, PHP reads a file called .user.ini in your site’s root folder. Adding these two lines usually works:

upload_max_filesize = 64M
post_max_size = 64M

Changes to .user.ini are cached by PHP and can take a few minutes to appear. Check Site Health again rather than assuming it failed.

4. .htaccess, only if PHP runs as an Apache module

Many tutorials suggest adding php_value upload_max_filesize 64M to .htaccess. That only works when PHP runs as an Apache module, which is now uncommon on shared hosting. Everywhere else, the line causes an immediate 500 Internal Server Error for the entire site. If you try it and the site breaks, remove the line and the site comes back. If you see that error and are not sure why, our page on fixing a 500 error in WordPress explains the other causes.

5. What does not work: wp-config.php

You will find advice to put @ini_set( 'upload_max_filesize', '64M' ); in wp-config.php. PHP does not allow that particular setting to be changed from inside a running script, so the line does nothing. It is harmless, but it wastes time. Raising WP_MEMORY_LIMIT in wp-config.php is a legitimate change, but it affects memory, not the upload ceiling.

Lowering the limit on purpose

Sometimes the server allows large files but you want WordPress to refuse them, for example to stop staff uploading 20 MB photos to blog posts. WordPress has an upload_size_limit filter for exactly that. A developer can add a short snippet that caps uploads lower than the server allows. Note that it can only lower the limit, never raise it past what PHP permits.

Why hosts set the limit low in the first place

A low default can feel like the host being difficult, but there are reasons behind it. On shared servers, many sites share the same pool of memory and disk. A single visitor or bot sending huge uploads can tie up resources for everyone, and a high limit also makes it easier to abuse an insecure upload form on any site on that server.

Large requests also stay open longer. On a busy plan with only a handful of PHP processes, one slow 200 MB upload over a weak connection can occupy a process for minutes, and other visitors queue behind it.

None of that means you should accept 2 MB for ever. It means the right limit is the smallest one that fits the real files your site handles. For most business sites that is somewhere comfortably above your largest PDF or image, not hundreds of megabytes. If you run a site that genuinely needs big files, such as a training platform with long videos, plan that into the hosting decision rather than forcing it onto a basic plan.

When the file is simply too big for the browser

Some files do not belong in a browser upload at all. Full-length videos, large backup archives and big design files are easier to handle another way:

  • Videos: host them on a video platform and embed them. Your server, your backups and your visitors will all be better off.
  • Themes and plugins: extract the zip locally, then copy the resulting folder into wp-content/themes or wp-content/plugins using FTP or your host’s file manager. Then activate it from the dashboard as normal.
  • Media in bulk: upload by FTP to a folder, then import it. Developers often use WP-CLI’s wp media import command for this, which registers the files in the Media Library properly.

If you are importing a whole site from another server and the backup file is too big for the importer, that is really a migration problem rather than an upload limit, and our WordPress migration service handles the move without relying on a browser upload.

A large image can pass the size check and still fail once it arrives, with a vague “HTTP error” instead of a size message. That is a processing problem, covered in our post on the HTTP error during image uploads. And if the limit is fine but you see “The link you followed has expired,” that wording belongs to the same family and is explained in our guide to the “Are you sure you want to do this?” message.

For the bigger picture of how these errors fit together, see our WordPress errors and fixes guide.

Keeping it sensible over time

  • Note your upload and memory limits somewhere you can find them. When a host migrates your account or you change plans, these often reset.
  • Re-check Site Health after any PHP version change. A new PHP version can start with default settings, and 2 MB is a common default.
  • Keep images small before upload regardless of the limit. A higher ceiling is not permission to upload camera originals.

If you have tried the control panel and the host’s support and the number still will not move, or a change has left the site showing errors, send us a screenshot of the Site Health Server section and the message you see. Our WordPress bug fixing team will back up the site first, find where the limit is really being set and tell you plainly whether your hosting plan allows what you need.

Next in this series: WordPress Media Library Not Loading? Causes and Fixes

Is Your Website Working Properly?

Get a free website health check from WebMaintor. We'll review your website's speed, security, forms, and technical health — and tell you exactly what needs attention.

No obligation. No automated reports. A real review by our team.