A low WordPress upload size limit stops you from uploading large files, plugins, and themes. If you're building a media-heavy website, that can exist 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 ways to become about solving this consequence. We'll cover them all in this commodity and show yous how to increase the maximum upload size in WordPress quickly.

Let's dive in!

Prefer to watch the video version?

What Is the Maximum Upload Size in WordPress?

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

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

To verify this, become to your WordPress site'due south Media Library. Hither, try to upload a file that crosses this maximum upload file size limit. You'll come across an error message that looks something similar this:

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

The "exceeds the maximum upload size for this site" error can be frustrating, but it exists for two main 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 result in incapacitating your website'south server, making your site come to a crawl. Or worse, information technology tin can bring your site downward altogether!

Want to upload a big file, plugin, or theme... but express by the max upload size?🗂 Learn how to resolve this common event quickly & easily right here ⬇️ Click to Tweet

How to Bank check the Current Maximum Upload Size in WordPress

There are many ways to bank check your WordPress site's electric current max upload size. Let's get through all of them.

In the Media Library

The quickest way to check your site'south current maximum upload size is to go to your WordPress dashboard, and from at that place, go to Media > Library. Here, click on the Add New push button to activate 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. message displays beneath the Select Files push. If you're using a dissimilar spider web hosting provider, yous may see a different limit listed hither.

You lot can also go to Media > Add New directly and see the aforementioned bulletin displayed at the lesser.

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

Again, yous tin 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 aid yous debug your WordPress site better. Here, you tin find almost all the information about your server and WordPress configuration.

As both the server and WordPress handle the max upload file size, at that place are two ways to find its value on this screen.

First, y'all can find information technology listed under the Media Handling dropdown. Here, look for the value of Max size of an uploaded file constant.

'Media Handling' settings in the 'Site Health Info' panel
'Media Handling' settings in the 'Site Wellness Info' console

The second method is to look under the Server dropdown. You'll detect many options related to your webserver's 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 Wellness Info' panel

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

  • PHP post max size: Defines the maximum upload limit for POST requests.
  • PHP memory limit: Defines the memory allocated for PHP. It should be set equal to or higher than the Upload max filesize limit. Or else the upload will fail.

Your web host sets these options. Unremarkably, starter hosting plans volition have a lesser upload size limit than enterprise hosting plans. Some hosts may allow y'all to override these limits. But in most cases, you may demand your hosting provider'due south assistance (and perhaps a plan upgrade) to increment them.

Why Increase the Maximum Upload File Size in WordPress?

There are many reasons why you may demand to increase your WordPress site's maximum upload file size. Here are the about common ones:

  • You lot want to install a big theme or plugin directly through the WordPress admin dashboard.
  • Updating your WordPress site regularly is a not bad fashion to keep your readers engaged and render for more. And that includes uploading new images, videos, audios, and other media regularly. All the same, that's non always feasible when there's a file size limit for your uploads.
  • You want to upload a large video or image every bit your site'south background or header.
  • Yous program to sell digital files such as ebooks, photographs, videos, themes, and plugins straight from your site. Sometimes, these files can run up to hundreds of megabytes (or more).

Now that we've covered the nuts of max upload file size in WordPress, let'due south larn how to increment it.

10 Ways to Increase the Max Upload File Size in WordPress

There are many ways yous tin fix the WordPress maximum upload size result. We'll start with the easiest ones beginning, and and then nosotros'll move on to the intermediate-level tutorials.

Contact Your Hosting Provider for Assistance

If yous're facing issues with uploading files and file size limits, reaching out to your hosting provider for assistance is one of the quickest solutions. Increasing the upload limit is a trivial task for tech support, so almost hosting companies tin can assistance you fix this outcome quickly.

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

If you're hosting your site with Kinsta, our knowledgeable back up squad is but a click away and bachelor 24/vii. To get started, go to your MyKinsta dashboard and click the chat icon in the bottom right corner.

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

We accept representatives to assist yous in many languages, including English, Castilian, French, High german, Italian, and Portuguese.

Increase the Max Upload File Size in WordPress Multisite

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

Start, head to your Network Admin dashboard, and and so become to Settings > Network Settings screen. Hither, scroll downward till you find the Upload Settings section. You'll find 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 (~ane.five MB). Yous tin change this to a college value and click the Salvage Changes push.

Note: Yous cannot circumvent the server-level max upload size limit from here. If the limit you set here is higher than the server's max upload size limit, the server will ignore information technology. You 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'

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

You can as well limit the total size of files uploaded to an individual site in the Multisite network. Even so, it's disabled by 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.

Equally per PHP documentation, iii PHP directives are responsible for how WordPress handles uploads. They are:

  • upload_max_filesize
  • post_max_size
  • memory_limit

Nosotros've already discussed them in the Site Health Info department higher up. It would help if you modified these 3 directives' values to admit your file sizes. For example, if the largest file you're planning to upload is 32 MB, nosotros recommend the post-obit settings:

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

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

Uploads can contain extra information in add-on to the file itself. So, giving all other upload-related directives some animate space is a skillful idea. You tin can read our in-depth tutorial on how to improve PHP retention limit in WordPress for more than information.

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

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

Open the.htaccess file with a text editor or code editor, and and then add 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        

Y'all can find two other PHP directives in the higher up lawmaking: max_execution_time and max_input_time . They ascertain how long a server spends on a single PHP task. The bigger your uploads, the bigger the time spent will be. You need to ready their values to a number that's appropriate for your utilize example.

Note: Yous may get a 500 Internal Server Error afterward using the method above. Most likely, it'southward considering your server is running PHP in CGI mode. In such cases, y'all cannot utilize the above commands in your .htaccess file.

Create or Modify the 'php.ini' File

The php.ini file is where you lot 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 lot can find the php.ini file in your WordPress root directory. In some cases, y'all may not locate it at that place. Fret not! You lot tin create a new file with the same name in your site'due south 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 the following code 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 allow y'all to alter PHP settings via this method. In such a case, you can keep to try the following solution instead.

Subscribe Now

Create or Alter the '.user.ini' File

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

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

Next, add the post-obit code to your .user.ini file:

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

Yous'll find that it's a repeat of the previous method, except with a different filename.

Change PHP Options via cPanel

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

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

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

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

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

Scroll down here to change 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 prepare here depend on your current hosting program.

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

If you lot have whatsoever doubts about these values, we suggest you contact your hosting provider. The latest cPanel dashboard saves changes automatically, and then you don't have to click anything. Simply if you're using an older cPanel version, make sure to click the Salve Changes button.

Increase the Max Upload File Size in Nginx

Nginx is another webserver like Apache, but it's also a lot more. Typically, Nginx tin can handle more concurrent requests than Apache, making it a lot faster. Kinsta uses Nginx to ability its functioning-optimized hosting solutions for WordPress.

If you're running your WordPress site on Nginx, yous'll need to modify both your php.ini and nginx.conf files. Nosotros've dealt with the one-time file before. The latter i is called an Nginx config file.

On an Nginx server, you lot tin can notice the php.ini file at /etc/php/vii.4/fpm/php.ini . Depending on which PHP version you've installed, the verbal path may vary slightly.

          upload_max_filesize = 64M post_max_size = 128M        

You lot don't have to set the memory_limit in the above file as Nginx handles information technology differently. For more than, you lot can check out this Stack Overflow thread. Afterward saving your php.ini file, enable the changes by restarting PHP-FPM using the below lawmaking in your final:

          sudo service php7.iv-fpm restart        

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

Side by side, apply Nginx's client_max_body_size directive to prepare the new max upload size limit. You need to declare this directive in the nginx.conf file, which you can find at /etc/nginx/nginx.conf .

You tin can declare this directive within the http {...} block, the server {...} block, or the location {...} block.

Setting it in the http block volition affect all the sites/apps hosted on this server.

          http {     ...     client_max_body_size 128M; }        

Defining it in the server block will merely affect a specific site/app hosted by this server.

          server {     ...     client_max_body_size 128M; }        

The location block only affects the specified directory (e.g. files, uploads) within 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 control in your concluding:

          sudo service nginx reload        

If you're a Kinsta client, you can't access your Nginx config straight. However, you can attain out to our support team, and they can quickly make the changes for yous.

Use the WordPress 'upload_size_limit' Filter

WordPress two.five introduced the upload_size_limit filter, which filters the maximum upload size immune in php.ini. Fifty-fifty WordPress uses this filter to show y'all the max upload size allowed, like in the Media Library and Site Health Info screens.

Beneath is an case of this filter in action from WordPress correspondent 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 (maybe) Filtered size limit. */ function filter_site_upload_size_limit( $size ) { // Prepare the upload size limit to x MB for users lacking the 'manage_options' capability. if ( ! current_user_can( 'manage_options' ) ) { // ten MB. $size = 1024 * 10000; } return $size; } add_filter( 'upload_size_limit', 'filter_site_upload_size_limit', 20 );        

The above code uses WordPress' manage_options capability to set up this limit but for non-admins. You lot can change the code to target specific user roles or user ids. Read our in-depth WordPress roles and capabilities article for more information.

Utilise a WordPress Plugin

Messing with code using SSH or FTP/SFTP is not for everyone. If yous're non comfortable with writing or editing code, you can utilize a WordPress plugin instead.

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

We'll be using the WP Maximum Upload File Size plugin here. As of writing this, it'due south the but upward-to-engagement plugin on the WordPress plugin repository that helps you become this washed.

To become started, install and actuate the WP Maximum Upload File Size plugin. Next, go to its settings screen in your WordPress dashboard. Here, yous can see the maximum upload file size set 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 set by WordPress is lesser than that ready by your hosting provider. Hence, you lot can crank it upwardly by choosing the Maximum Upload File Size with the dropdown presented.

Note: If you lot want to set a max upload file size limit that'due south larger than the one fix past your hosting provider, it's not possible to do information technology via this plugin. For that, you need to contact your hosting provider.

Upload Files via FTP/SFTP

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

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

If you lot accept a lot of large files to upload, this is the fastest method. You tin 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's the instance, you can employ the gratis Add From Server plugin to import the uploaded files into WordPress.

Alternatively, you tin do the same direct from the command line past 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 adding 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'due south root directory via FTP/SFTP or SSH 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 code 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 piece of work because you can only use the ini_set() function to set PHP directives that belong to the PHP_INI_ALL changeable way.

Every bit upload_max_size and post_max_size belong to the PHP_INI_PERDIR child-bearing mode. Y'all 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 you know why it fails.

Verify Your WordPress Site's New Max Upload File Size

Finally, it's time to verify whether the new max upload file size limit is implemented in your WordPress site. To do this, follow the aforementioned 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 inverse.

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

Yes, it has changed. That's a success!

You tin besides go to the Site Health Info panel and check for the same under Media Treatment 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 Health Info > Server'

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

Summary

As you've seen, increasing the maximum upload file size in WordPress isn't likewise complex. Whether yous're building a media-heavy portfolio site or installing a big theme, it's just a thing of knowing where to expect for and what commands or tools to utilize.

In nearly cases, reaching out to your hosting provider should exist plenty. However, if you're stuck with a troublesome host, we've shown you lot some alternative methods you tin try earlier migrating to meliorate hosting.

Get uploading!

Did nosotros cover it all? If you lot've experienced a stubborn case of upload file size limits, let u.s.a. know how you managed to fix it.


Save fourth dimension, costs and maximize site performance with:

  • Instant help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • Global audience reach with 29 information centers worldwide.
  • Optimization with our born Application Operation Monitoring.

All of that and much more, in one program with no long-term contracts, assisted migrations, and a 30-mean solar day-coin-dorsum-guarantee. Check out our plans or talk to sales to find the program that's right for you.