A depression WordPress upload size limit stops you from uploading large files, plugins, and themes. If you're building a media-heavy website, that can 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 ways to get well-nigh solving this issue. We'll comprehend them all in this article and show you how to increase the maximum upload size in WordPress quickly.

Let's swoop in!

Adopt 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 forestall 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, go to your WordPress site's Media Library. Here, try to upload a file that crosses this maximum upload file size limit. You'll run across an mistake message that looks something like this:

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

The "exceeds the maximum upload size for this site" error tin be frustrating, but information technology exists for two master reasons: security and efficiency. It hinders site owners and other users, including malicious actors, from uploading huge files (eastward.g. loftier-resolution images, large videos).

Otherwise, it can result in incapacitating your website'southward server, making your site come to a crawl. Or worse, it can bring your site downward birthday!

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

How to Bank check the Current Maximum Upload Size in WordPress

In that location are many ways to cheque your WordPress site's current max upload size. Let's go through all of them.

In the Media Library

The quickest fashion to cheque your site's current maximum upload size is to go to your WordPress dashboard, and from at that place, go to Media > Library. Hither, click on the Add New push to actuate the media uploader tool.

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

Every bit Kinsta hosts this site, the Maximum upload file size: 128 MB. message displays below the Select Files button. If you lot're using a different web hosting provider, yous may run across a different limit listed here.

You can besides become to Media > Add New directly and come across the aforementioned bulletin displayed at the bottom.

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

Once again, you can run into the 128 MB max upload file size here.

In the Site Health Info

WordPress 5.two added the Site Health Info tool to help y'all debug your WordPress site better. Here, you tin find well-nigh all the information about your server and WordPress configuration.

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

Starting time, you tin find it listed nether the Media Handling dropdown. Hither, 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 Health Info' panel

The second method is to await under the Server dropdown. You'll find many options related to your webserver'southward setup under here. Please search for the value for Upload max filesize constant to encounter 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

Y'all tin can also meet other PHP constants and their values, such as:

  • PHP post max size: Defines the maximum upload limit for Mail service requests.
  • PHP memory limit: Defines the retention allocated for PHP. It should exist gear up equal to or higher than the Upload max filesize limit. Or else the upload will fail.

Your web host sets these options. Commonly, starter hosting plans will take a bottom upload size limit than enterprise hosting plans. Some hosts may let you to override these limits. But in nearly cases, you may need your hosting provider's assistance (and possibly a plan upgrade) to increase them.

Why Increase the Maximum Upload File Size in WordPress?

At that place are many reasons why you lot may need to increase your WordPress site'south maximum upload file size. Hither are the near common ones:

  • Y'all want to install a big theme or plugin straight through the WordPress admin dashboard.
  • Updating your WordPress site regularly is a great way to keep your readers engaged and render for more. And that includes uploading new images, videos, audios, and other media regularly. However, that's not e'er viable when there'south a file size limit for your uploads.
  • You desire to upload a large video or image as your site'south background or header.
  • You lot plan 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 basics of max upload file size in WordPress, permit'south larn how to increase it.

10 Ways to Increase the Max Upload File Size in WordPress

At that place are many ways you tin fix the WordPress maximum upload size issue. We'll start with the easiest ones first, and so we'll motion on to the intermediate-level tutorials.

Contact Your Hosting Provider for Help

If you're facing issues with uploading files and file size limits, reaching out to your hosting provider for aid is 1 of the quickest solutions. Increasing the upload limit is a petty task for tech support, so nigh hosting companies can help you fix this issue speedily.

Tinkering with your server or site configuration files tin can always exist a claiming. Hence, we always recommend you lot effort this method starting time.

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

Contact Kinsta support easily through MyKinsta
Contact Kinsta support easily through MyKinsta

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

Increment the Max Upload File Size in WordPress Multisite

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

Showtime, head to your Network Admin dashboard, and and then go to Settings > Network Settings screen. Hither, scroll down till you lot observe the Upload Settings section. Yous'll detect the Max upload file size field in this expanse.

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 (~one.five MB). You lot can change this to a higher value and click the Save Changes button.

Notation: You 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 apply 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 set 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's disabled by default.

Update Your '.htaccess' File

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

As per PHP documentation, 3 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 Wellness Info department above. It would help if yous modified these three directives' values to acknowledge your file sizes. For instance, if the largest file you're planning to upload is 32 MB, nosotros recommend the following settings:

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

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

Uploads can contain extra information in improver to the file itself. So, giving all other upload-related directives some breathing space is a adept idea. Yous can read our in-depth tutorial on how to improve PHP retention limit in WordPress for more data.

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

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

Open the.htaccess file with a text editor or code editor, and and so add together the following 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 2 other PHP directives in the above code: max_execution_time and max_input_time . They ascertain how long a server spends on a unmarried PHP task. The bigger your uploads, the bigger the time spent will be. You lot 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 above. About likely, it's because your server is running PHP in CGI way. In such cases, y'all cannot utilise the above commands in your .htaccess file.

Create or Modify the 'php.ini' File

The php.ini file is where you ascertain 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, yous may not locate it there. Fret not! You 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 lawmaking 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 salve your file later on making the changes. Some hosts don't allow yous to modify PHP settings via this method. In such a instance, you can continue to try the post-obit solution instead.

Subscribe At present

Create or Alter the '.user.ini' File

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

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

Side by side, add the following lawmaking to your .user.ini file:

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

You lot'll notice that it'due south 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 assist yous manage your server and site configuration, you tin can alter 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 section.

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

Here, you lot tin 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 get to the PHP Options panel.

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

Scroll downwards here to change the values of PHP directives such equally 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 plan.

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

If you lot take whatsoever doubts about these values, we advise you lot contact your hosting provider. The latest cPanel dashboard saves changes automatically, and then you don't have to click anything. But if yous'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, but it'southward also a lot more. Typically, Nginx tin can handle more concurrent requests than Apache, making it a lot faster. Kinsta uses Nginx to power its performance-optimized hosting solutions for WordPress.

If you're running your WordPress site on Nginx, you'll demand to modify both your php.ini and nginx.conf files. Nosotros've dealt with the sometime file earlier. The latter ane is called an Nginx config file.

On an Nginx server, you can find the php.ini file at /etc/php/7.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 accept to set the memory_limit in the above file as Nginx handles it differently. For more, you can check out this Stack Overflow thread. Later saving your php.ini file, enable the changes by restarting PHP-FPM using the beneath lawmaking in your last:

          sudo service php7.4-fpm restart        

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

Next, use Nginx'due south client_max_body_size directive to prepare the new max upload size limit. You lot need to declare this directive in the nginx.conf file, which you can discover at /etc/nginx/nginx.conf .

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

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

          http {     ...     client_max_body_size 128M; }        

Defining it in the server block will only bear on 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) inside a site/app.

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

Don't forget to relieve the file and restart Nginx to utilise the changes. To do that, you can utilize the post-obit command in your final:

          sudo service nginx reload        

If y'all're a Kinsta client, you can't admission your Nginx config directly. However, yous can reach out to our support squad, and they can quickly brand the changes for you.

Use the WordPress 'upload_size_limit' Filter

WordPress 2.five introduced the upload_size_limit filter, which filters the maximum upload size immune in php.ini. Even WordPress uses this filter to show you the max upload size allowed, like in the Media Library and Site Wellness Info screens.

Below is an example of this filter in action from WordPress contributor Drew Jaynes. Information technology defines the upload size limit for all not-admin roles.

          /** * Filter the upload size limit for non-administrators. * * @param cord $size Upload size limit (in bytes). * @return int (maybe) Filtered size limit. */ office filter_site_upload_size_limit( $size ) { // Set the upload size limit to 10 MB for users lacking the 'manage_options' capability. if ( ! current_user_can( 'manage_options' ) ) { // 10 MB. $size = 1024 * 10000; } return $size; } add_filter( 'upload_size_limit', 'filter_site_upload_size_limit', 20 );        

The above lawmaking uses WordPress' manage_options capability to gear up this limit merely for non-admins. You can modify the lawmaking to target specific user roles or user ids. Read our in-depth WordPress roles and capabilities commodity for more information.

Employ a WordPress Plugin

Messing with code using SSH or FTP/SFTP is not for everyone. If yous're non comfortable with writing or editing lawmaking, you tin can use 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's the just upwards-to-date plugin on the WordPress plugin repository that helps yous get this washed.

To get started, install and activate the WP Maximum Upload File Size plugin. Adjacent, go to its settings screen in your WordPress dashboard. Here, you tin come across the maximum upload file size ready by both your hosting provider and WordPress.

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

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

Annotation: If you lot want to set a max upload file size limit that's larger than the i fix by your hosting provider, information technology's not possible to practise it via this plugin. For that, you need to contact your hosting provider.

Upload Files via FTP/SFTP

Are you still struggling with all the above methods? Or with your hosting provider to have them raise the upload file size limit? You tin 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 computer with SFTP

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

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

Alternatively, yous can do the same straight 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 adding it here because we've found many web tutorials that list information technology every bit a legitimate way to increase the max upload size in WordPress.

Information technology involves going to your site'south root directory via FTP/SFTP or SSH so 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' );        

Information technology fails to work because y'all tin can just apply the ini_set() role to set up PHP directives that belong to the PHP_INI_ALL child-bearing mode.

As upload_max_size and post_max_size belong to the PHP_INI_PERDIR changeable way. You can only set them via php.ini, .htaccess, http.conf, or .user.ini.

If yous'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 practise this, follow the same procedure we discussed in a higher place to cheque the max upload file size in WordPress.

Get 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'

Yep, information technology has changed. That'southward a success!

You tin also go to the Site Health Info panel and bank check for the same 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 Wellness 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 agree you back! 🙅‍♂️ This guide will bear witness you how you tin 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 too complex. Whether you're building a media-heavy portfolio site or installing a large theme, it'south only a thing of knowing where to wait for and what commands or tools to use.

In near cases, reaching out to your hosting provider should be enough. However, if you're stuck with a troublesome host, we've shown you some alternative methods you can effort before migrating to meliorate hosting.

Become uploading!

Did we comprehend it all? If yous've experienced a stubborn case of upload file size limits, let us know how you lot managed to fix it.


Save time, costs and maximize site performance with:

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

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