A low WordPress upload size limit stops you from uploading large files, plugins, and themes. If you lot'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, at that place are many ways to go most solving this issue. We'll cover them all in this article and show you how to increment the maximum upload size in WordPress speedily.

Let's dive in!

Prefer to lookout man the video version?

What Is the Maximum Upload Size in WordPress?

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

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

To verify this, go to your WordPress site's Media Library. Hither, try to upload a file that crosses this maximum upload file size limit. Yous'll see an error message that looks something like this:

Error while uploading a large file in WordPress
Error while uploading a big 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. Information technology hinders site owners and other users, including malicious actors, from uploading huge files (east.g. high-resolution images, big videos).

Otherwise, it tin can result in incapacitating your website's server, making your site come to a clamber. Or worse, information technology can bring your site down birthday!

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

How to Check the Electric current Maximum Upload Size in WordPress

At that place 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 way to check your site'southward 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 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 below the Select Files button. If yous're using a unlike web hosting provider, you lot may see a unlike limit listed hither.

You tin also go to Media > Add New direct and see the same bulletin displayed at the lesser.

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

Again, you tin can run across 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 lot debug your WordPress site better. Hither, you can find almost all the information virtually your server and WordPress configuration.

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

Outset, you can find it 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 Treatment' settings in the 'Site Health Info' console

The second method is to await under the Server dropdown. You'll find many options related to your webserver's setup under here. Delight 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' console

You can also see 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 memory allocated for PHP. Information technology should be ready equal to or higher than the Upload max filesize limit. Or else the upload will fail.

Your web host sets these options. Usually, starter hosting plans will have a lesser upload size limit than enterprise hosting plans. Some hosts may allow yous to override these limits. But in well-nigh cases, y'all may need your hosting provider'due south help (and maybe a plan upgrade) to increase 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 most common ones:

  • You want to install a large theme or plugin direct through the WordPress admin dashboard.
  • Updating your WordPress site regularly is a slap-up manner to proceed your readers engaged and return for more. And that includes uploading new images, videos, audios, and other media regularly. However, that's non always feasible when there'due south a file size limit for your uploads.
  • You want to upload a large video or image as your site's background or header.
  • You plan to sell digital files such as ebooks, photographs, videos, themes, and plugins directly from your site. Sometimes, these files can sew together to hundreds of megabytes (or more).

Now that we've covered the basics of max upload file size in WordPress, let's acquire how to increase it.

ten Ways to Increase the Max Upload File Size in WordPress

There are many ways you can ready the WordPress maximum upload size issue. We'll commencement with the easiest ones commencement, and then we'll movement 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 assist is one of the quickest solutions. Increasing the upload limit is a trivial job for tech support, so well-nigh hosting companies can help you fix this issue apace.

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

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

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

We have representatives to help 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 modify the max upload file size for your network.

First, head to your Network Admin dashboard, and then go to Settings > Network Settings screen. Here, scroll down till you detect 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 (~1.5 MB). You can alter this to a higher value and click the Relieve Changes button.

Annotation: 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 volition ignore it. Yous tin can utilise the methods described in a higher place to detect 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 too limit the full size of files uploaded to an private site in the Multisite network. However, it'southward disabled by default.

Update Your '.htaccess' File

If your webserver runs on Apache, you can update your site'southward .htaccess file to increase the max upload size in WordPress. You lot can notice 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 higher up. Information technology would help if you modified these 3 directives' values to admit your file sizes. For instance, if the largest file you lot're planning to upload is 32 MB, we recommend the following settings:

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

Detect, all the values use Thou instead of MB. That'due south how PHP handles its directives.

Uploads can comprise extra information in addition to the file itself. So, giving all other upload-related directives some breathing space is a good thought. You can read our in-depth tutorial on how to improve PHP retentiveness limit in WordPress for more than information.

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

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

Open up the.htaccess file with a text editor or code editor, 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 lot can detect two other PHP directives in the in a higher place code: max_execution_time and max_input_time . They define how long a server spends on a single PHP chore. The bigger your uploads, the bigger the fourth dimension spent will be. Yous demand to set their values to a number that's advisable for your use case.

Notation: You may get a 500 Internal Server Error subsequently using the method above. Most probable, it's because your server is running PHP in CGI manner. In such cases, you cannot use 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 can observe the php.ini file in your WordPress root directory. In some cases, you may non locate it at that place. Fret not! You can create a new file with the aforementioned proper 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 together the post-obit code to your existing or new php.ini file:

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

Don't forget to salvage your file after making the changes. Some hosts don't allow you to change PHP settings via this method. In such a case, you can go on to effort 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 take configured the server to work with .user.ini files instead of php.ini files.

Like php.ini and .htaccess files, you can detect the .user.ini in your site's root directory. If you can't discover information technology, so you tin 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.

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

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

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

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

Here, you can modify your server'due south 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 downwardly 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 gear up here depend on your current hosting plan.

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

If you lot accept whatever doubts about these values, we suggest yous contact your hosting provider. The latest cPanel dashboard saves changes automatically, so you don't have to click anything. But if you lot're using an older cPanel version, make sure to click the Save Changes button.

Increase the Max Upload File Size in Nginx

Nginx is some other webserver like Apache, just information technology's also a lot more. Typically, Nginx tin handle more than concurrent requests than Apache, making information technology a lot faster. Kinsta uses Nginx to ability its performance-optimized hosting solutions for WordPress.

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

On an Nginx server, yous tin 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 don't have to set the memory_limit in the in a higher place file as Nginx handles it differently. For more, you lot tin bank check out this Stack Overflow thread. Later on saving your php.ini file, enable the changes by restarting PHP-FPM using the beneath code in your final:

          sudo service php7.4-fpm restart        

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

Side by side, use Nginx'due south client_max_body_size directive to set the new max upload size limit. Yous demand to declare this directive in the nginx.conf file, which you tin can find at /etc/nginx/nginx.conf .

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

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

          http {     ...     client_max_body_size 128M; }        

Defining it in the server cake will simply affect a specific site/app hosted past this server.

          server {     ...     client_max_body_size 128M; }        

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

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

Don't forget to salvage the file and restart Nginx to use the changes. To do that, y'all can use the post-obit command in your last:

          sudo service nginx reload        

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

Utilize 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 prove you lot 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 contributor Drew Jaynes. It defines the upload size limit for all non-admin roles.

          /** * Filter the upload size limit for non-administrators. * * @param string $size Upload size limit (in bytes). * @return int (mayhap) Filtered size limit. */ part 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 higher up code uses WordPress' manage_options capability to set this limit only for non-admins. You tin can alter the code to target specific user roles or user ids. Read our in-depth WordPress roles and capabilities article for more data.

Use a WordPress Plugin

Messing with code using SSH or FTP/SFTP is not for anybody. If you lot're not comfortable with writing or editing code, you can employ a WordPress plugin instead.

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

Nosotros'll be using the WP Maximum Upload File Size plugin hither. As of writing this, it'south the only up-to-date plugin on the WordPress plugin repository that helps y'all become this done.

To go started, install and activate the WP Maximum Upload File Size plugin. Next, get to its settings screen in your WordPress dashboard. Here, yous tin can meet the maximum upload file size prepare by both your hosting provider and WordPress.

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

Here, yous can run into that the maximum upload file size ready by WordPress is lesser than that set by your hosting provider. Hence, you can crank it upward past choosing the Maximum Upload File Size with the dropdown presented.

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

Upload Files via FTP/SFTP

Are yous still struggling with all the above methods? Or with your hosting provider to take them enhance the upload file size limit? You tin can ever upload large files via FTP/SFTP.

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

If y'all accept 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's the case, you can utilize 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 piece of work anymore. Nosotros'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'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 together 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 work considering you tin can only use the ini_set() part to set PHP directives that vest to the PHP_INI_ALL changeable way.

Equally upload_max_size and post_max_size vest to the PHP_INI_PERDIR changeable mode. You can but set them via php.ini, .htaccess, http.conf, or .user.ini.

If you lot've tried this method earlier without seeing any results, now you know why information technology fails.

Verify Your WordPress Site'due south New Max Upload File Size

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

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

You tin can too go to the Site Health Info panel and check for the aforementioned 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 allow the maximum upload size in WordPress concur you back! 🙅‍♂️ This guide volition evidence you how you can easily increase the limit to accommodate your larger files 👇 Click to Tweet

Summary

Every bit y'all've seen, increasing the maximum upload file size in WordPress isn't too complex. Whether you're edifice a media-heavy portfolio site or installing a large theme, it'southward just a matter of knowing where to look for and what commands or tools to utilize.

In near cases, reaching out to your hosting provider should exist plenty. However, if you're stuck with a troublesome host, we've shown you some alternative methods you can attempt earlier migrating to ameliorate hosting.

Get uploading!

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


Save time, costs and maximize site performance with:

  • Instant help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • Global audience accomplish with 29 data centers worldwide.
  • Optimization with our congenital-in Application Performance Monitoring.

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