A low WordPress upload size limit stops you from uploading large files, plugins, and themes. If y'all're building a media-heavy website, that tin be a considerable obstacle. It's necessary to increase the max upload size in WordPress or your server (or both) in such cases.

Depending on your hosting provider and server, there are many means to get about solving this issue. We'll cover them all in this article and show you how to increase the maximum upload size in WordPress quickly.

Permit'south dive in!

Prefer to watch the video version?

What Is the Maximum Upload Size in WordPress?

Uploading big files to a server consumes a lot of the server's resource. To prevent users from causing server timeouts, the default maximum upload size in WordPress typically ranges from 4 MB to 128 MB. Normally, the hosting provider sets this limit at the server level.

WordPress also includes constants that define this limit, but they cannot override the server-level settings in most cases.

To verify this, go to your WordPress site's Media Library. Here, endeavor to upload a file that crosses this maximum upload file size limit. You'll see an fault message that looks something like this:

Error while uploading a large file in WordPress
Error while uploading a large file in WordPress

The "exceeds the maximum upload size for this site" error tin exist frustrating, but it exists for 2 primary reasons: security and efficiency. It hinders site owners and other users, including malicious actors, from uploading huge files (e.g. high-resolution images, large videos).

Otherwise, it tin can effect in incapacitating your website'due south server, making your site come to a crawl. Or worse, it tin bring your site downwards altogether!

Want to upload a large file, plugin, or theme... but limited past the max upload size?🗂 Learn how to resolve this common issue quickly & easily right here ⬇️ Click to Tweet

How to Check the Current Maximum Upload Size in WordPress

There are many ways to check your WordPress site'south current max upload size. Allow's go through all of them.

In the Media Library

The quickest way to check your site's current maximum upload size is to go to your WordPress dashboard, and from there, become to Media > Library. Here, click on the Add together New push to actuate the media uploader tool.

The "Maximum upload size limit" in WordPress
The "Maximum upload size limit" in WordPress

As Kinsta hosts this site, the Maximum upload file size: 128 MB. bulletin displays beneath the Select Files button. If you're using a unlike web hosting provider, yous may see a different limit listed hither.

You can likewise go to Media > Add New straight and see the aforementioned message displayed at the bottom.

The
The "Maximum upload file size" in WordPress' Media Library

Once more, you can see the 128 MB max upload file size here.

In the Site Health Info

WordPress 5.2 added the Site Health Info tool to help you debug your WordPress site better. Hither, you tin can find most all the data about your server and WordPress configuration.

As both the server and WordPress handle the max upload file size, there are two ways to detect its value on this screen.

First, you can observe it listed under the Media Handling dropdown. Here, look for the value of Max size of an uploaded file abiding.

'Media Handling' settings in the 'Site Health Info' panel
'Media Treatment' settings in the 'Site Health Info' panel

The second method is to look under the Server dropdown. Yous'll find many options related to your webserver'south setup under here. Please search for the value for Upload max filesize constant to see what it is. On this site, the max upload file size limit is 128 MB.

'Server' settings in the 'Site Health Info' panel
'Server' settings in the 'Site Health Info' panel

You tin can also see other PHP constants and their values, such as:

  • PHP mail service max size: Defines the maximum upload limit for Mail service requests.
  • PHP retentivity limit: Defines the memory allocated for PHP. It should exist set equal to or college than the Upload max filesize limit. Or else the upload will fail.

Your spider web host sets these options. Usually, starter hosting plans will accept a lesser upload size limit than enterprise hosting plans. Some hosts may allow you to override these limits. But in virtually cases, you may demand your hosting provider's assist (and perhaps a program upgrade) to increment them.

Why Increase the Maximum Upload File Size in WordPress?

There are many reasons why yous may need to increase your WordPress site's maximum upload file size. Hither are the most common ones:

  • Y'all want to install a large theme or plugin directly through the WordPress admin dashboard.
  • Updating your WordPress site regularly is a great way to keep your readers engaged and return for more. And that includes uploading new images, videos, audios, and other media regularly. However, that'south not always viable when at that place's a file size limit for your uploads.
  • You want to upload a large video or epitome as your site's background or header.
  • Y'all programme to sell digital files such as ebooks, photographs, videos, themes, and plugins direct from your site. Sometimes, these files tin sew together to hundreds of megabytes (or more than).

At present that nosotros've covered the basics of max upload file size in WordPress, permit's learn how to increase it.

10 Means to Increase the Max Upload File Size in WordPress

There are many ways yous can gear up the WordPress maximum upload size result. We'll start with the easiest ones first, and so we'll motion on to the intermediate-level tutorials.

Contact Your Hosting Provider for Assist

If you're facing issues with uploading files and file size limits, reaching out to your hosting provider for assistance is 1 of the quickest solutions. Increasing the upload limit is a piddling task for tech support, and then almost hosting companies can help yous fix this issue chop-chop.

Tinkering with your server or site configuration files tin can always be a challenge. Hence, we always recommend you try this method first.

If you're hosting your site with Kinsta, our knowledgeable support team is just a click away and available 24/7. To go started, get to your MyKinsta dashboard and click the chat icon in the lesser right corner.

Contact Kinsta support easily through MyKinsta
Contact Kinsta back up easily through MyKinsta

We have representatives to assist you lot in many languages, including English language, Spanish, French, German, Italian, and Portuguese.

Increase the Max Upload File Size in WordPress Multisite

If you're running a WordPress Multisite network, and then you can modify the max upload file size for your network.

Start, caput to your Network Admin dashboard, and then become to Settings > Network Settings screen. Here, scroll downward till you lot find the Upload Settings section. Y'all'll notice the Max upload file size field in this area.

The 'Max upload file size' in 'Network Settings'
The 'Max upload file size' field in 'Network Settings'

The default value of Max upload file size in a WordPress Multisite is 1500 KB (~1.5 MB). Y'all can modify this to a college value and click the Save Changes button.

Note: You cannot circumvent the server-level max upload size limit from here. If the limit you lot set here is higher than the server's max upload size limit, the server will ignore it. Yous tin can use the methods described above to find your webserver's configuration.

The new 'Max upload file size' field in 'Network Settings'
The new 'Max upload file size' in 'Network Settings'

Here, we've ready the new max upload file size to 131072 KB (~128 MB).

You can also limit the total size of files uploaded to an individual site in the Multisite network. However, it'southward disabled past default.

Update Your '.htaccess' File

If your webserver runs on Apache, y'all can update your site's .htaccess file to increase the max upload size in WordPress. You lot can find your .htaccess file in the WordPress site's root directory.

As per PHP documentation, three PHP directives are responsible for how WordPress handles uploads. They are:

  • upload_max_filesize
  • post_max_size
  • memory_limit

We've already discussed them in the Site Health Info department in a higher place. It would help if yous modified these iii directives' values to acknowledge your file sizes. For example, if the largest file you lot're planning to upload is 32 MB, nosotros recommend the following settings:

  • upload_max_filesize = 32M
  • post_max_size = 64M
  • memory_limit = 128M

Observe, all the values utilize M instead of MB. That's how PHP handles its directives.

Uploads tin contain actress information in improver to the file itself. So, giving all other upload-related directives some breathing space is a adept idea. Y'all can read our in-depth tutorial on how to meliorate PHP memory limit in WordPress for more information.

Access your .htaccess file via FTP/SFTP or your hosting provider'south File Manager.

Finding the '.htaccess' file
Finding the '.htaccess' file

Open the.htaccess file with a text editor or code editor, and then add together the post-obit code:

          php_value upload_max_filesize 32M php_value post_max_size 64M php_value memory_limit 128M php_value max_execution_time 300 php_value max_input_time 300        

You can notice ii other PHP directives in the above code: max_execution_time and max_input_time . They define how long a server spends on a unmarried PHP task. The bigger your uploads, the bigger the time spent will exist. You need to set up their values to a number that's appropriate for your use case.

Note: You may get a 500 Internal Server Error after using the method higher up. Most likely, it'due south because your server is running PHP in CGI way. In such cases, y'all cannot employ the above commands in your .htaccess file.

Create or Modify the 'php.ini' File

The php.ini file is where you define changes to your default PHP settings. Typically, it contains directives that define file timeouts, max upload size, and resource limits.

Using SSH or FTP, you tin find the php.ini file in your WordPress root directory. In some cases, you may not locate it there. Fret not! You lot can create a new file with the aforementioned proper noun in your site's root directory.

How to create a new php.ini file
How to create a new php.ini file

With a code or text editor, add together the post-obit lawmaking to your existing or new php.ini file:

          upload_max_filesize = 32M post_max_size = 64M memory_limit = 128M        

Don't forget to save your file after making the changes. Some hosts don't let y'all to change PHP settings via this method. In such a case, you lot can proceed to endeavour the following solution instead.

Subscribe Now

Create or Change the '.user.ini' File

If your hosting provider has locked down the global PHP settings, they may accept configured the server to work with .user.ini files instead of php.ini files.

Like php.ini and .htaccess files, you tin find the .user.ini in your site's root directory. If you can't discover information technology, then you can create a new .user.ini file in the aforementioned location. Follow the same procedure described in the previous method to create a newphp.ini file.

Next, add the following code to your .user.ini file:

          upload_max_filesize = 32M post_max_size = 64M memory_limit = 128M        

You'll notice that information technology's a repeat of the previous method, except with a unlike filename.

Change PHP Options via cPanel

If your hosting provider uses the cPanel dashboard to help you manage your server and site configuration, you lot can change the max upload file size through its interface.

To get started, get to your cPanel dashboard, and select the Select PHP Version nether the Software department.

Click 'Select PHP Version' in cPanel dashboard
Click 'Select PHP Version' in the cPanel dashboard

Here, you lot can change your server's electric current PHP version and enable/disable many PHP extensions. Click on the Options link in the navigation menu to go to the PHP Options panel.

Go to the 'PHP Options' settings in cPanel
Go to the 'PHP Options' settings in cPanel

Scroll down hither to modify the values of PHP directives such as upload_max_filesize , post_max_size , memory_limit , max_execution_time , and max_input_time . The max values you can ready here depend on your current hosting plan.

The 'PHP Options' screen in cPanel
The 'PHP Options' screen in cPanel

If yous have any doubts most these values, we advise yous contact your hosting provider. The latest cPanel dashboard saves changes automatically, and so you don't have to click anything. Simply if you're using an older cPanel version, make sure to click the Save Changes button.

Increase the Max Upload File Size in Nginx

Nginx is another webserver like Apache, just it'due south besides a lot more. Typically, Nginx can handle more concurrent requests than Apache, making information technology a lot faster. Kinsta uses Nginx to power its functioning-optimized hosting solutions for WordPress.

If you're running your WordPress site on Nginx, you'll need to alter both your php.ini and nginx.conf files. We've dealt with the former file before. The latter one is called an Nginx config file.

On an Nginx server, yous can find the php.ini file at /etc/php/7.iv/fpm/php.ini . Depending on which PHP version you've installed, the exact path may vary slightly.

          upload_max_filesize = 64M post_max_size = 128M        

You lot don't have to set up the memory_limit in the above file every bit Nginx handles it differently. For more, you can check out this Stack Overflow thread. After saving your php.ini file, enable the changes past restarting PHP-FPM using the below lawmaking in your terminal:

          sudo service php7.4-fpm restart        

Again, the verbal code may vary slightly depending on the PHP version installed on your server.

Next, employ Nginx'south client_max_body_size directive to set the new max upload size limit. You need to declare this directive in the nginx.conf file, which you lot tin can find at /etc/nginx/nginx.conf .

Yous can declare this directive inside the http {...} cake, the server {...} block, or the location {...} block.

Setting it in the http block will impact all the sites/apps hosted on this server.

          http {     ...     client_max_body_size 128M; }        

Defining it in the server cake volition merely impact a specific site/app hosted past this server.

          server {     ...     client_max_body_size 128M; }        

The location block only affects the specified directory (east.g. files, uploads) inside a site/app.

          location /files {     ...     client_max_body_size 128M; }        

Don't forget to relieve the file and restart Nginx to apply the changes. To do that, you can use the following command in your terminal:

          sudo service nginx reload        

If yous're a Kinsta client, you can't access your Nginx config directly. However, you tin can achieve out to our support team, and they can speedily brand the changes for you.

Utilise the WordPress 'upload_size_limit' Filter

WordPress ii.5 introduced the upload_size_limit filter, which filters the maximum upload size allowed in php.ini. Even WordPress uses this filter to prove you the max upload size allowed, like in the Media Library and Site Health Info screens.

Below is an case of this filter in action from WordPress contributor Drew Jaynes. It defines the upload size limit for all non-admin roles.

          /** * Filter the upload size limit for not-administrators. * * @param string $size Upload size limit (in bytes). * @return int (perhaps) Filtered size limit. */ function filter_site_upload_size_limit( $size ) { // Ready the upload size limit to ten MB for users lacking the 'manage_options' capability. if ( ! current_user_can( 'manage_options' ) ) { // x MB. $size = 1024 * 10000; } render $size; } add_filter( 'upload_size_limit', 'filter_site_upload_size_limit', 20 );        

The above code uses WordPress' manage_options adequacy to set this limit merely for non-admins. You tin modify the code to target specific user roles or user ids. Read our in-depth WordPress roles and capabilities commodity for more information.

Utilize a WordPress Plugin

Messing with lawmaking using SSH or FTP/SFTP is not for everyone. If y'all're not comfy with writing or editing lawmaking, y'all can utilize a WordPress plugin instead.

WP Maximum Upload File Size plugin
WP Maximum Upload File Size plugin

We'll exist using the WP Maximum Upload File Size plugin here. As of writing this, it's the just up-to-date plugin on the WordPress plugin repository that helps you get this done.

To become started, install and activate the WP Maximum Upload File Size plugin. Adjacent, go to its settings screen in your WordPress dashboard. Here, you can run across the maximum upload file size gear up by both your hosting provider and WordPress.

WP Maximum Upload File Size settings screen
WP Maximum Upload File Size settings screen

Here, you tin can see that the maximum upload file size gear up by WordPress is bottom than that set by your hosting provider. Hence, you lot can crank information technology up by choosing the Maximum Upload File Size with the dropdown presented.

Note: If y'all desire to set a max upload file size limit that's larger than the i set by your hosting provider, information technology'south non possible to practise it via this plugin. For that, you demand to contact your hosting provider.

Upload Files via FTP/SFTP

Are you yet struggling with all the above methods? Or with your hosting provider to have them raise the upload file size limit? You can e'er upload large files via FTP/SFTP.

FileZilla window with a site connected
Drag and drop files to and for your server and figurer with SFTP

If you take a lot of large files to upload, this is the fastest method. You can read our in-depth tutorial on how to bulk upload files to the WordPress media library for more data.

Sometimes, WordPress doesn't recognize files uploaded via FTP/SFTP. If that'south the case, you can use the free Add From Server plugin to import the uploaded files into WordPress.

Alternatively, you can do the same directly from the command line by importing images using WP-CLI. The wp media import command allows you to create attachments from local files or URLs.

Don't Edit the 'wp-config.php' File

Editing the wp-config.php file doesn't work anymore. We're calculation it here because we've found many spider web tutorials that list it as a legitimate way to increase the max upload size in WordPress.

It involves going to your site's root directory via FTP/SFTP or SSH and then editing the wp-config.php file.

Finding the 'wp-config.php' file
Finding the 'wp-config.php' file

You're suggested to add the following lawmaking to the wp-config.php file:

          @ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '128M'); @ini_set( 'memory_limit', '256M' );        

It fails to work because you can only use the ini_set() office to set PHP directives that vest to the PHP_INI_ALL changeable mode.

Equally upload_max_size and post_max_size belong to the PHP_INI_PERDIR child-bearing manner. You can only set them via php.ini, .htaccess, http.conf, or .user.ini.

If you've tried this method before without seeing any results, now y'all know why information technology fails.

Verify Your WordPress Site's New Max Upload File Size

Finally, it'south time to verify whether the new max upload file size limit is implemented in your WordPress site. To practise this, follow the same procedure we discussed above to check the max upload file size in WordPress.

Go to your Media Library in the WordPress dashboard and check whether the max upload file size limit has changed.

Verifying the new max upload file size limit
Verifying the new max upload file size in 'Media Library'

Aye, it has inverse. That'southward a success!

You can also go to the Site Health Info panel and check for the aforementioned under Media Handling and Server dropdowns.

Verifying the new max upload file size limit in 'Site Health Info'
Verifying the new max upload file size in 'Site Health Info > Media Library'
Verifying the new max upload file size limit in 'Site Health Info'
Verifying the new max upload file size in 'Site Wellness Info > Server'

Don't let the maximum upload size in WordPress hold you back! 🙅‍♂️ This guide volition show you how yous can easily increase the limit to accommodate your larger files 👇 Click to Tweet

Summary

Equally you've seen, increasing the maximum upload file size in WordPress isn't too complex. Whether you lot're building a media-heavy portfolio site or installing a large theme, it's but a matter of knowing where to expect for and what commands or tools to utilise.

In most cases, reaching out to your hosting provider should be enough. However, if y'all're stuck with a troublesome host, we've shown you lot some alternative methods you tin can endeavour before migrating to ameliorate hosting.

Get uploading!

Did we encompass information technology all? If you've experienced a stubborn example of upload file size limits, let us know how you managed to fix it.


Save fourth dimension, costs and maximize site operation with:

  • Instant help from WordPress hosting experts, 24/seven.
  • Cloudflare Enterprise integration.
  • Global audition reach with 32 information centers worldwide.
  • Optimization with our congenital-in Application Functioning Monitoring.

All of that and much more, in one plan with no long-term contracts, assisted migrations, and a 30-solar day-money-back-guarantee. Check out our plans or talk to sales to discover the programme that'south correct for y'all.