Increase the WordPress Upload Limit: Uploading Larger Files

6 min read Auf Deutsch lesen

You want to upload a larger image, a theme, or a video, and WordPress stops you: “The uploaded file exceeds the upload_max_filesize directive in php.ini.” The limit is set server-side – and in most cases quickly raised.

Where’s Your Current Limit?

In WordPress you’ll see it under Media → Add New (“Maximum upload file size”) and in detail under Tools → Site Health → Info → Server. Two values matter:

  • upload_max_filesize – the maximum size of a single file.
  • post_max_size – the maximum size of the entire request. This must be at least as large as upload_max_filesize, otherwise the increase won’t take effect.

The generator sets both to match.

Raising the Limit

Which file works depends on your hosting – work through them top to bottom. Pick a value, copy the matching snippet:

PHP Limits Generator

Set a PHP limit

Pick a limit, copy the right file. Everything runs in your browser.

What do you want to increase?
Target value

Your input never leaves the browser. Snippets are generated locally via JavaScript.

A quick word:

  • php.ini – if you control the server (dedicated server/VPS).
  • .htaccess – Apache with mod_php only. On PHP-FPM/FastCGI this throws a 500 → use .user.ini.
  • .user.ini – for PHP-FPM/FastCGI/CGI, lives in the root directory.

Note: unlike the memory limit, the upload size cannot be set as a WordPress constant in wp-config.php – these are pure PHP directives.

After the change, reload the admin and check the value again in Site Health.

Don’t Forget: The Memory Limit

With large uploads – especially images – processing follows the upload: WordPress generates several preview sizes, and that needs memory. A generous upload limit helps little if the image processing afterwards fails at the memory limit. Anyone raising the upload size significantly should check the memory at the same time.

Still No Effect?

Then your host has set a lower hard limit. Ask for the maximum permitted value – many shared hosting plans cap out at 64 or 128 MB. For very large files (videos), an external service is often a better choice than a direct media upload anyway. Other error patterns can be sorted out via the overview of WordPress errors.


If the upload still fails despite the change, or you’d rather not touch the server files: drop us a line – we’ll set the right limit.

Frequently Asked Questions

How do I increase the upload limit in WordPress?

Via a PHP configuration file: php.ini if you control the server, .htaccess on Apache with mod_php, or .user.ini on PHP-FPM and FastCGI. There you set upload_max_filesize and post_max_size to higher values. The upload size can't be set in wp-config.php, as these are pure PHP directives. The generator on this page produces the matching snippet.

Why does post_max_size matter?

upload_max_filesize limits the single file, post_max_size the entire request including all data sent with it. If post_max_size is smaller than upload_max_filesize, the increase doesn't take effect – the large file is rejected anyway. That's why post_max_size must always be at least as large as upload_max_filesize, ideally a bit larger.

Where do I see the current upload limit?

Right in the WordPress backend: under Media, Add New you'll see the maximum upload file size, and in detail Tools, Site Health, Info, Server shows the upload_max_filesize and post_max_size values. That's also where you check after a change whether the new value was actually applied.

What if raising the limit has no effect?

Then your host has usually set a hard limit above your configuration that takes precedence. Ask support for the maximum permitted value; many shared hosting plans cap out at 64 or 128 MB. For very large files like videos, an external service is often a better choice than a direct media upload anyway.

Daniel Nilges
Daniel Nilges

Founder & Full-Stack Developer

20+ years of web development experience. Specialised in Laravel, WordPress and custom software for mid-sized businesses.